India’s online retailer Flipkart is going to buy its rival Snapdeal in a takeover offer of up to $950m, now that Snapdeal’s board has accepted it.

A deal is now pending the approval of Snapdeal shareholders, sources familiar with the matter told Reuters.

If successful, the acquisition would make Flipkart India’s largest e-commerce provider, making it a strong competitor to Amazon which has been making moves in the country recently.

The two companies have been in talks over a merger since at least April, according to Bloomberg. However, different offers from Flipkart have been tabled by Snapdeal’s board, notably an $850m offer that the board rejected earlier this month for being too low.

One reason for the rejection of the bids so far is thought to be because Snapdeal investors are unhappy at seeing the value of the business fall from its peak of $7bn and its time as one of India’s coveted unicorns.

Earlier this year, it was forced to let go of 600 employees and its founders, Junal Bahl and Rohit Banasal, stopped drawing salaries. It also cut costs by using automated systems to reduce labour and renegotiated vendor contracts.

As a further cost-cutting exercise, it may be forced to sell its digital payments arm, FreeCharge. In April, The Times of India reported that Snapdeal was thinking about selling FreeCharge for a 50 percent discount for only $200m.

Sources told Reuters that the Indian private-sector lender Axis Bank is the frontrunner to acquire FreeCharge. This deal would only be worth $60m, however.

It is thought that this sale, and also the Flipkart acquisition, are being pushed by Snapdeal’s backer, the Japanese technology conglomerate Softbank.

Softbank has reportedly lost around $1.14bn in investments in India, mainly because of its involvement with the retailer.

In addition, if the Flipkart-Snapdeal goes through, Flipkart would stand to benefit from funding from Softbank, which will soon be launching its $100bn Vision Fund to support technology startups. Its backers for the Vision fund include the likes of Apple and Saudi Arabia.

Investments from this fund would be key for Flipkart to fend off competition from Amazon, which has pledged to invest $3bn in India to aid its expansion.

Despite talks dragging on for months, it is thought that Snapdeal’s board could be making a final decision within the coming months, and the establishment of Flipkart as India’s dominant e-commerce market will be imminent.