Iraq's Federal Supreme Court has ruled that the federal government can deploy troops to the country's international borders, including in the Kurdish region. State television reported the ruling on Wednesday, a day after Prime Minister Ali al-Zaidi ordered federal forces to take over Kurdish-run border crossings and demanded authority over oil fields controlled by Kurdish security forces.

The court also ruled that federal authorities can oversee agencies at all border crossings, including those in northern Iraq. They must coordinate with regional and provincial governments on customs administration. The federal oil ministry can oversee and audit oil and gas fields. Baghdad shares responsibility for managing the oil and gas they produce with regional and producing provinces, according to state TV.

The Kurdistan Regional Government called the move "an assault" on the region's "constitutional rights." It rejected what it called "military language and threats" in a statement from the Iraqi military announcing the new measures. The regional government said it is working with federal authorities to combat corruption and called for an end to oil smuggling across Iraq.

The Iraqi government did not say how or when the takeover would be carried out.

Iraq's state news agency, citing what it described as a federal intelligence report, said oil belonging to the state-owned North Oil Company was being diverted and smuggled from Kirkuk and from Sulaimaniyah to Iran and onward to Afghanistan.

A week earlier, al-Zaidi ordered troops to prepare to enter Jurf al-Sakhar, a stronghold south of Baghdad of Kataib Hezbollah, a Shia militia aligned with Iran, following oil smuggling allegations. The group initially responded with defiance but allowed soldiers into the city after a compromise brokered by Shia politicians.

Renad Mansour, deputy director of the Middle East and North Africa programme at Chatham House, said Iraq's judiciary was "very much supportive" of the government's campaign to establish a centralised political order. A senior Shia politician close to al-Zaidi told Reuters that the prime minister is trying to dismantle a "state within a state." Analysts quoted in the report say implementing these moves against the Kurds and the Iran-backed militias will be challenging.