The federal government ruling was made during a continuing government-formation process that has been delayed by political wrangling.
In the aftermath of October's election, the Kurdish Democratic Party — the largest party in the Kurdish region — has allied itself with Shiite cleric Moqtada Al Sadr's Sadrist Bloc and key Sunni parties.
The alliance puts them in pole position to form the next government, to the chagrin of several Iran-backed parties who performed badly at the polls.
Last week, the Federal Supreme Court barred Hoshyar Zebari, the KDP's candidate for president, from running, citing corruption allegations against him dating back to 2016.
The KDP has since nominated a replacement candidate, Rebar Ahmed, in another attempt by the Sadrist-KDP alliance to move the government formation process forward.
On Tuesday Mr Al Sadr condemned what he called political interference in the judiciary. Mr Al Sadr said parliament must focus on taking action that prevents “politicised partisan or judicial interference.”
It was not clear whether his remarks referred to the ruling against the Kurdish oil law, which would be a blow to his allies in the KDP, who dominate the oil industry in the Kurdish region.
Struggle for oil rights
The court's ruling could call into question dozens of oil and gas contracts signed by the semi-autonomous region since 2005, when the region's ministry of natural resources signed a contract with Norwegian company DNO, allowing the company to drill for oil near Zahko, close to the Turkish border.
Subsequent contracts signed by the Kurds set off a series of political clashes over the Iraqi constitution and the extent to which it allowed regions of Iraq to exercise rights over production and exports of oil. Iraq's oil ministry has long viewed Iraqi Kurdish oil contracts as illegal.
A federal oil and gas law intended to clarify articles of the constitution governing oil and gas was never passed by Iraq's parliament. The impasse over independent Kurdish export rights has never been resolved, despite a number of short-lived deals over the years.
Iraq's 2021 budget — the 2022 budget cannot be passed before the new government is formed — says the Kurdish region must hand over 250,000 barrels per day of production to Baghdad in return for budget transfers, but the federal government says the Kurds have not met this obligation.
The row culminated in a 2014 move by former Iraqi prime minister Nouri Al Maliki to cut budget transfers to the Kurdish region, after the Kurds built a pipeline to Turkey that could carry independent oil exports.
The budget cut plunged the Kurdish government into a lengthy financial crisis and the transfers — originally agreed at 17 per cent of oil revenues — were never fully restored despite efforts of subsequent governments to rebuild ties between Baghdad and Erbil, capital of the Kurdish region.
The supreme court's ruling on Tuesday said that oil produced in the Kurdish region must be handed over to the ministry of oil in Baghdad, denying the region substantial revenues at a time of historically high oil prices.
The court's decision comes as Masrour Barzani, Prime Minister of Iraq’s Kurdistan Region, is on a two-day visit to Qatar.
It is Mr Barzani’s first visit to the Gulf state, during which he will attempt to “bolster bilateral relations, especially in trade exchange, investment, energy and agriculture”, a statement from his office said.
The two sides are also expected to discuss “investment partnerships for agricultural and industrial development [and] explore agriculture trade and energy co-operation".
Mr Barzani will also “propose the opening of a Qatari consulate general in the Kurdistan region”, said the statement.