In this file photo taken on October 5, 2022, a logo of Total Energies is pictured at a gas station in Genech, northern France.AFP
The contract, originally signed in 2021, includes investments in oil, gas and solar production.
But the two sides had disagreed over the terms, with an Iraqi oil ministry spokesman saying earlier this year that Baghdad wanted a 40-percent stake, with TotalEnergies getting 60 percent.
A source at the ministry said the French company wanted Iraq to have a smaller stake.
TotalEnergies said Wednesday that Iraq's Basrah Oil Company will get a 30-percent stake in the project while a Qatari firm -- QatarEnergy -- will get 25 percent and the French firm will own 45 percent.
The agreement follows four rounds of talks between TotalEnergies chief executive Patrick Pouyanne and Iraqi Prime Minister Mohammed Shia al-Sudani, the company said.
Despite being home to a wealth of hydrocarbon reserves, Iraq's neglected electricity grid is dilapidated and a victim of the country's rampant corruption, with power cuts lasting for hours.
Neighbouring Iran currently supplies a third of Iraq's gas and electricity, and Baghdad is seeking greater energy independence.
The $10 billion Gas Growth Integrated Project (GGIP) includes recovering flared gas from oil fields to power electricity-generation plants.
A one-gigawatt solar power plant will be built to supply electricity to the Basra regional grid, with Saudi firm ACWA Power joining the project, TotalEnergies said.
The GGIO also includes the construction of a seawater treatment plant to provide water used in oil production -- an alternative to using fresh water from rivers and aquifers, the French firm said.
"TotalEnergies welcomes the continuity of the voice of the State of Iraq on this Development & Production Contract, which is a strong and positive signal for foreign investment in the country," the company said.