BAGHDAD—The United States has allowed Iraq to import Iranian gas for its power grid for another three months by extending a waiver to sanctions—but insists that Baghdad seek alternative sources.

Iraq has had several extensions to the waiver first granted last year after Washington reimposed sanctions on Tehran’s oil sector forbidding countries from purchasing Iranian energy.

“An additional 120-day waiver was granted to allow Iraq to continue to pay for electricity imports from Iran,” the U.S. State Department said in an emailed statement.

An Iraqi government source said the extension was given during a phone call between Prime Minister Adel Abdul Mahdi and U.S. Secretary of State Mike Pompeo.

The State Department said the United States continued to insist on “diversifying energy imports away from Iran,” however.

President Donald Trump’s administration has said oil-rich Iraq must become more self-reliant for its electricity, including by harnessing gas energy and reducing flaring at oil production sites.

U.S. energy giant General Electric is in the running to win a large share of multibillion-dollar contracts to rebuild Iraq’s electricity system amid intense U.S. lobbying efforts.

Washington reimposed sanctions on Iran’s oil industry in November, citing concerns about its nuclear program and what it said was its meddling in the Middle East.

Iraqi officials have said they might need years to wean the country of Iranian power.

Iraq relies heavily on Iranian gas to feed several power stations, importing roughly 1.5 billion standard cubic feet per day via pipelines in the south and east.

Washington wants to roll back Iranian influence in the Middle East, including in Iraq, where Tehran holds broad sway over politics and trade.

Although Iraq has one of the world’s largest natural gas reserves, it has moved slowly to develop them and has relied on Iran to supply it with gas and electricity.