Total won a 30% stake in a new 25-year contract to operate Qatar's largest offshore oilfield, in the second major upstream development deal for the French oil firm in the Arab Gulf region in as many years, officials said on June 27.

State-owned Qatar Petroleum will keep the remaining 70% in the new joint venture for the Al-Shaheen Field, which is 80 kilometers (km), or 50 miles, offshore Qatar, and which currently produces around 300,000 barrels per day (Mbbl/d).

Six international oil firms, including BP Plc (NYSE: BP) and Royal Dutch Shell Plc (NYSE: RDS.A) have bid to operate the oil field.

The deal announcement on June 27 is a blow to Denmark's A.P. Moller-Maersk, which has been operating the oil field 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 Qatar 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 Qatar Petroleum, said at a news conference in Doha, Qatar, on June 27.

Total plans to invest more than $2 billion in developing the Al-Shaheen oil field over five years, the company's CEO said. "We have a plan to invest for five years 2017-2022, more than $2 billion in that field in order to integrate technology," 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 Co. 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.

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