Thousands of Iraqi soldiers and allied militia are locked in an armed standoff with Kurdish forces in the disputed oil province of Kirkuk amid a sharp row between Baghdad and the autonomous Kurdish region of Iraq.

A senior Kurdish official on Saturday said Iraq's central government had given Peshmerga fighters a 2am on Sunday (23:00 GMT on Saturday) deadline to surrender key military positions seized during the fightback against ISIL over the past three years.

Al Jazeera could not independently verify the existence of such a deadline.

The reports of the deadline came as heavily armed Iraqi troops and members of the Popular Mobilisation Force (PMF) - paramilitary units largely made up of Iran-trained Shia militias - massed around Kirkuk, already retaking a string of positions to the south of the city after Kurdish forces withdrew.

The Kurds also deployed thousands of Peshmerga fighters to the area around the city, vowing to defend it "at any cost."

"They have moved towards our position," said Bahjat Ahmed, a Peshmerga commander. "We will not withdraw, we will defend this position to the last Peshmerga."

Al Jazeera's Charles Stratford, reporting from the westernmost Peshmerga position in Kirkuk, said dozens of tanks and armoured vehicles of Shia militias had been stationed in the area, not far from the Kurdish forces.

"The tension here is frankly palpable," Stratford said. "The Peshmerga here say this is a defensive position, but they are not going to withdraw any further back."

Crisis talks

The two sides have been at loggerheads since the Kurds voted overwhelmingly for secession in a September 25 referendum that Baghdad rejected as illegal.

Polling was held not only in the three provinces of the autonomous Kurdish region but also in adjacent Kurdish-held areas, including Kirkuk.

Iraqi Prime Minister Haider al-Abadi has said there can be no further discussion of the Kurds' long-standing demands to incorporate Kirkuk and other historically Kurdish-majority areas in their autonomous region until the secession vote is annulled.

READ MORE: Who are the Kurds?

He has repeatedly denied any plan to go further and actually attack the territory, insisting on Thursday that he was "not going ... to make war on our Kurdish citizens".

The Kurdistan Regional Government (KRG) has repeatedly accused Iraqi forces and allied militias deployed south and west of Kirkuk of bellicose intentions.

So far the front lines have been quiet but the Kurds said they had received an ultimatum to withdraw.

"The deadline set for the Peshmerga to return to their pre-June 6, 2014 positions will expire during the night," a senior Kurdish official told AFP, asking not to be identified. Asked at what time, he said 2am on Sunday.

OPINION: Why is Israel supporting Kurdish secession from Iraq?

Just hours before the deadline, a Peshmerga commander on the western front said Kurdish fighters had "taken all the necessary measures" and were "ready for a confrontation", if necessary.

If "the other side makes the mistake of advancing, we'll give them a lesson they won't forget in a hurry", Kamal Kirkuki told AFP news agency.

Najm Eddine Karim, the Kurdish governor of Kirkuk, said there is only one way to prevent potential conflict.

"For the Iraqi army and Hashd al-Shaabi [PMF] to go back to their places, to go back to where they said they will go, otherwise it will not de-escalate. It's the only way," he said.

Meanwhile, Iraqi President Fuad Masum, who is himself a Kurd, was holding crisis talks in the Kurdish city of Sulaimaniyah.

'We don't want a shooting situation'

The June 2014 lines are those that the Kurds held before the Islamic State of Iraq and the Levant (ISIL, also known as ISIS) armed group swept through vast areas north and west of Baghdad, prompting many Iraqi army units to disintegrate and Kurdish forces to step in.

The Kurds control the city of Kirkuk and three major oil fields in the province which account for a significant share of the regional government's oil revenues.

Elsewhere, tensions flared on Saturday in Tuz Khurmatu, some 75km south of Kirkuk in neighbouring Salaheddin province, after an overnight clash left three PMF paramilitaries and two Peshmerga wounded.

In Washington, Secretary of Defense James Mattis said on Friday the situation in Kirkuk had the full attention of the United States, which has military advisers deployed with both sides in the standoff.

"We are trying to tone everything down and to figure out how we go forward without losing sight of the enemy," Mattis told reporters.

"Everybody stay focused on defeating ISIS. We can't turn on each other right now. We don't want to go to a shooting situation," he added.