DUBAI, Oct 18 (Reuters) - Qatar has agreed to supply Shell in the Netherlands with gas for 27 years, the second such deal with a European buyer in a week, as the Gulf state competes with the United States to help Europe replace lost Russian supplies.

Shell's agreement is identical to a TotalEnergies deal last week with QatarEnergy to supply France. Both are Qatar's biggest and longest gas supply deals with Europe.

Qatar, the world's top exporter of liquefied natural gas (LNG), has previously focused on long-term supplies to the Asian market.

But European Union buyers have signed deals to import gas to compensate for the loss of supply from Russia after the EU imposed restrictions on Russian energy imports in response to Russia's invasion of Ukraine last year.

Affiliates of QatarEnergy and Shell agreed to two sale and purchase agreements for 3.5 million tonnes of LNG a year (mtpa) for 27 years, QatarEnergy said.

The deal reaffirmed "Qatar's commitment to help meeting Europe's energy demands and bolstering its energy security with a source known for its superior economic and environmental qualities," QatarEnergy chief Saad al-Kaabi said in the company's statement.

But the long-term deals are potentially at odds with EU goals to reach net zero emissions by 2050.

France last month said the EU should set fossil fuel phase-out dates to strengthen its efforts to agree a global phase-out deal at the upcoming COP28 U.N. climate summit, hosted by the United Arab Emirates from Nov. 30.

A spokesman for the Dutch climate ministry Tim van Dijk said the government aimed to cut gas demand but would need gas "in the foreseeable future, as renewable alternatives and infrastructure are insufficiently available."

France's environment ministry did not immediately respond to requests for comment.

LONG-TERM SUPPLY

From 2026, the LNG will be delivered to Rotterdam in the Netherlands from two joint ventures between QatarEnergy and Shell in Qatar's North Field LNG expansion project, QatarEnergy said in a statement.

Shell holds a 6.25% stake in the North Field East project and a 9.375% share in the North Field South project.

Until now, Asia had outpaced Europe in locking in long-term LNG supply from Qatar's two-phase expansion plan that will raise its liquefaction capacity to 126 mtpa by 2027 from 77 mtpa.

EU buyers have long been reluctant to sign long-term gas deals with Qatar, as the European Commission has said long-term contracts could inhibit free flows of gas in Europe and they should not run beyond 2049.

QatarEnergy's previous deals include a 27-year LNG supply agreement with China's Sinopec sealed in November for 4 mtpa and an identical one signed in June with China National Petroleum Corporation (CNPC).

Prior to Russia's invasion of Ukraine in Feburary 2022, EU countries received almost 40% of their gas from Russia.

Germany was the biggest buyer and it too has turned to Qatar for replacement gas through a deal between QatarEnergy and ConocoPhillips signed in November last year to supply Germany with 2 mtpa of LNG for 15 years.

Kaushal Ramesh, vice president for LNG research at Rystad Energy, said European buyers had in all signed up to long-term deals that would reach around 27 mtpa in the 2030s, of which 9 mtpa is from Qatar.

Gas prices soared last year in response to the disruptions to Russian supply to Europe.

They have since fallen but analysts say limited supply means they could rise again if there is further disruption or winter weather in Europe or North East Asia is harsh.

"The gas market remains in a tight regime into 2024-25, until the next wave of supply hits the market in 2025-26," Timera analysts said.

(Reporting by Yousef Saba in Dubai, Marwa Rashad and Nina Chestney in London; Additional reporting by Shadia Nasralla in London, Bart Meijer in Amsterdam, Riham Alkoussa in Berlin and Elizabeth Pineau in Paris; editing by Lincoln Feast and Barbara Lewis)