The Kurdistan Regional Government (KRG) in Iraq announced it had signed a deal with the Russian state-owned oil corporation Rosneft that would allow the company to begin developing oil blocks worth a potential $400 million to the Kurds.

The announcement follows a turbulent week for the KRG, as the Iran-backed government in Baghdad launched an invasion into its territory and wrested Kirkuk, an oil-rich province, out of the Kurds’ hands. Iraqi officials claim the invasion was necessary following the KRG’s decision to hold a non-binding referendum asking its citizens whether they would support a path to independence from Iraq.

While many experts cite the Kurdish Peshmerga as the most effective ally of the United States against the Islamic State on the ground in Iraq, the Trump administration has refused to support the Kurds against the Iran-backed Shiite militias that have stormed Kirkuk, with President Donald Trump himself stating, “We’re not taking sides.”

Bloomberg reports that the Rosneft deal will allow the Russian oil company to develop five oil blocks in Kurdistan. The contract would give “Rosneft 80 percent of the projects, the company said in a statement on Wednesday. Rosneft may pay a fee of as much as $400 million, half of which could be repaid in oil pumped from the deposits.”

“The new agreements will allow us to talk about full-fledged entry of the company in one of the most promising regions,” Bloomberg quotes a statement from Rosneft as stating. The oil company statement estimated that the blocks in question would be complete by 2021, suggesting that the company expects to remain a long-term presence in the region despite the current stability, and expects the KRG to remain in control of the locations of those blocks throughout the process and not lose them to the Iraqi government.

The Russian government has long enjoyed positive relations with the KRG, though it has also maintained close relations to its most vocal opponents in the region: Iran and Turkey. While those governments, and that of Baghdad, have demanded the KRG discard the results of the referendum, Israeli newspaper Haaretz notes that Russia has remained “the only major power that has not called on Iraq’s Kurds to cancel [the] referendum.” The U.S. State Department has publicly opposed the referendum.

The outlet adds that Russia has also “become the top funder of Kurdish oil and gas deals.”

Russia and Iran cooperate militarily in Syria to protect dictator Bashar al-Assad and have typically supported each other in international forums like the United Nations. Russia’s financial support of the KRG, however, is at odds with Iran’s support of Shiite militias responsible for the invasion of disputed KRG territory. The Popular Mobilization Units (PMU), or Hashd al-Shaabi, have taken on a major role in the conquest of Kirkuk and have reportedly antagonized Kurdish Peshmerga throughout the region.

The Shiite Iraqi government has also admitted that Qasem Soleimani, the head of Iran’s notorious Iranian Revolutionary Guard Corps Quds Force, has aided their foray into Kurdish territory.

While the Trump administration has remained largely silent on the Iranian incursion into Iraq, U.N. Ambassador Nikki Haley condemned Soleimani’s presence in Kirkuk in particular. The U.N., she noted, “bans travel outside of Iran for senior Iranian officials, including Maj. General Sulemani, and yet the Secretary General’s report lists multiple press photos of the general traveling to Syria and Iraq. You can even find photos on social media of him visiting Russia. This is an open and direct violation of [resolution] 2231, and yet where is the outrage of this council?”

“Nearly every threat to peace and security in the Middle East is connected to Iran’s outlaw behavior,” Haley asserted on Wednesday.

Fox News notes that Haley appears to be contradicting Pentagon spokesman Army Col. Ryan Dillon, who told reporters this week that there was “no evidence Iran played a role in pushing Kurdish fighters out of Kirkuk on Monday.”

The Peshmerga have repeatedly accused Iran of supporting the attacks on their territory.

“Iranians were leading the battle on Kirkuk, and our forces had to withdraw to protect the lives of Peshmerga,” Sheikh Jaafar Mustafa, the commander of Kirkuk-based Peshmerga forces, said on Monday.

The [Kirkuk] attack, which came from the Iraqi government, the Popular Mobilization Forces, and IRGC’s Quds forces, is in retaliation to the calls for freedom by the people of Kurdistan,” the Peshmerga later said in a statement.

Follow Frances Martel on Facebook and Twitter.