BAGHDAD - Iraq will import gas from Turkmenistan under an initial agreement reached by the countries to meet part of Iraq's power station needs, its oil ministry said on Thursday.

"It was initially agreed to import quantities of gas to meet part of the needs of the electric power stations," Iraqi Deputy Oil Minister for gas affairs Azzat Sabir was quoted as saying by an oil ministry statement.

An agreement that will detail volumes of gas to be imported from Turkmenistan should be signed before the end of this year, Sabir said, following a meeting with Turkmenistan's gas sector officials in Turkmenistan.

Iraq imports electricity and gas from Iran that total between a third and 40% of its power supply, especially crucial in sweltering summer months when temperatures can top 50 degrees Celsius (122 degrees Fahrenheit) and power consumption peaks.

Iraq has had trouble paying for those imports due to U.S. sanctions that only allow Iran to access funds to buy non-sanctioned goods, such as food and medicine.

The United States has pushed Iraq, OPEC's second-largest producer, to cut its reliance on Iranian gas.

Iraq continues to flare some of the gas extracted alongside crude oil because it lacks the facilities to process it into fuel for local consumption or exports.

(Reporting by Ahmed Rasheed Writing by Nayera Abdallah Editing by Mark Potter)