Image caption Shares of Youku and Tudou surged on the New York Stock Exchange after the deal was announced

China's two largest online video firms, Youku and Tudou, have agreed to merge in a bid to cut costs and boost their market share.

Youku is to acquire rival Tudou via a stock swap deal valued at $1bn (£640m).

The two companies have seen their losses widen in recent months because of the rising costs of acquiring and streaming video content.

The merger will create the biggest online video firm in China, the world's largest internet market.

"The fact that we are the two strongest brands in the market, the content scale as well as the ability to have two differentiated brands... will make us both much stronger competitors," said Victor Koo chairman and chief executive of Youku.

Back to profitability?

Youku's net loss widened 32% from a year earlier in the fourth quarter of last year to 49.6m yuan ($7.9m; £5m).

Tudou also reported a net loss of 148.9m yuan during the period.

According to analysts, competition between the two firms to buy rights to video content and to attract advertisers to their respective websites have caused the losses.

They believe that a merger will not only reduce licensing costs but also give the new entity, which is expected to have a market share of more than 35%, more leverage in negotiating with advertisers.

According to some estimates, a joint operation may result in savings of between $50m to $60m over the next 18 months.

"It (the deal) is a sign of how difficult this market is and both companies have probably realized how hard the road ahead would be if they went the independent route," said Bill Bishop, an independent analyst based in Beijing.

"It should help them get to profitability."