BAGHDAD -- Iraq has reached a deal with the Kurdish government to exchange oil from the autonomous northern region for a nearly 20 per cent share of the national budget, resolving a months-long impasse that had undermined national unity in the face of the Islamic State group's onslaught.

The agreement stipulates that the semi-autonomous Kurdish government will cede 550,000 barrels of oil per day to the Iraqi oil ministry, more than half of which will come from the disputed Kirkuk oil fields, according to Iraqi Finance Minister Hoshyar Zebari. In exchange, the Kurds will receive the 17-per cent share of the national budget allocated to their region, plus installments of as much as $1 billion to boost the capabilities of Kurdish peshmerga fighters battling the militant group.

"This deal is a win-win deal for both sides," Zebari, a Kurd, told The Associated Press.

"The (Kurdish government) needed more stability in its relations with Baghdad and the Iraqi government is going through very serious financial difficulties because of the drop in oil prices," he said.

Iraq's Oil Minister Adel Abdul-Mahdi said in a televised statement that joint committees will be formed to follow up with the implementation of the agreement and address any lingering issues "in order to establish fruitful relations based on the constitution and the principles of partnership and fairness."

Earlier this year, Baghdad cut the 17 per cent of the state budget that is supposed to go to the Kurdish region -- which in 2013 totalled about $12 billion, according to Zebari. The central government withheld the funds after the Kurds began transporting oil from fields inside the autonomous zone to Turkey against Baghdad's wishes.

The Kurdish government says it needs that money to meet its growing security demands, particularly amid the current fight against the Islamic State group, and to pay public-sector employees and fund much-needed infrastructure development.

The Kurds and Baghdad have feuded for years over a host of issues, chief among them the rights to oil resources in the north and disputed territory like the city of Kirkuk, which the Kurds want to add to their autonomous zone.

Since Prime Minister Haider al-Abadi came to power in September, the Kurds have pushed for a quick resolution, saying they will give him three months to resolve the outstanding oil dispute or boycott his government.

Last month, the government in Irbil, the capital of the Kurdish region, agreed preliminarily to sell 150,000 barrels of oil per day to the federal government in return for a one-time payment of $500 million.

Associated Press reporter Sameer N. Yacoub in Baghdad contributed to this report.