The U.S. is pressuring Iraq to sever extensive energy ties to Iran, enlisting American companies and allies such as Saudi Arabia to develop alternatives and drive a commercial wedge between Baghdad and Tehran.

The push is part of a broader American effort to curb Iran’s influence in Iraq, where a 900-mile border, economic ties and Shiite Muslim majorities have created closer ties between the former enemies since the 2003 U.S. invasion. Despite its position as a major oil producer, Iraq relies on Iran for natural gas that generates as much as 45% of its electricity.

The U.S. wants to use sanctions on Iran to pry Iraq out of Tehran’s orbit but fears it could weaken the country, which is only just emerging from a three-year war against Islamic State. Too much pressure could also backfire by ultimately driving Iraq closer to Iran, officials and analysts say.

The U.S. granted Baghdad a 45-day exemption from Iranian sanctions, allowing it to keep importing natural gas. But American officials acknowledge Iraq will need more time to wean itself off Iran’s power supply. Iraqi officials expect the waiver to be extended, perhaps for years.

“This is a challenge for us,” said Raid Fehmi, a prominent Iraqi lawmaker. “If [the U.S.] puts too much pressure, it could destabilize us which could destabilize the region. The Americans don’t want that.”