(Story corrected to add Maersk RIC)

The logo of French oil and gas company Total is seen during a shareholders meeting in Paris, France, May 24, 2016. REUTERS/Charles Platiau

DOHA (Reuters) - Total TOTF.PA has won a 30 percent stake in a new 25-year contract to operate Qatar's largest offshore oilfield, officials said on Monday, in the second major upstream development deal for the French oil firm in the Gulf region in as many years.

State-owned Qatar Petroleum (QP) will keep the remaining 70 percent in the new joint venture for the Al-Shaheen field, which is 80 km (50 miles) off Qatar’s coast and currently produces around 300,000 barrels per day (bpd).

Six international oil firms including BP BP.L and Royal Dutch Shell Plc RDSa.L have bid to operate the oilfield.

The deal announcement on Monday is a blow to Denmark's A.P. Moller-Maersk MAERSKb.CO, which has been operating the oilfield since 1992.

For years it was expected that Maersk Oil would renew its 25-year production agreement on Al-Shaheen field when its license runs out in 2017. But the Gulf state surprised the company last year by putting out a tender for the field.

Maersk submitted a new bid for the field but Total has made the best offer.

“Total was the best bidder, we are happy to see Total wins that process,” Saad al-Kaabi, CEO of state-owned Qatar Petroleum (QP) said at a news conference in Doha on Monday.

Total plans to invest more than $2 billion in developing the Al-Shaheen oilfield over five years, the company’s chief executive said.

“We have a plan to invest for five years 2017-2022, more than $2 billion in that field in order to integrate technology,” Total’s CEO Patrick Pouyanne told the news conference in Doha.

“Our first objective is to maintain 300,000 barrels a day. Currently that’s not a given as there’s a natural decline (in production) as its a complex field,” Pouyanne said.

“If we have opportunities to increase production we will, there are parts of the field which have not been developed,” he added.

Total will be in charge with operating the oilfield starting July 14, 2017, and a new company named North Oil Company will be created to manage the joint venture, Kaabi said.

The new deal is a boost for Total, which in January last year, it became the first oil major to renew a 40-year onshore concession in the United Arab Emirates, putting its peers under pressure to improve terms after the French firm made the best offer.

In a statement Maersk Oil said it will be “redeploying a number of its employees which today are based in Qatar elsewhere in its global organization.”

“The majority of remaining employees in Qatar are expected to be offered employment by the new operator,” it added.

QP’s Kaabi said all of Maersk Oil’s employees in Qatar will be guaranteed a job in the new company created for the venture.