SULAIMANIA/BAGHDAD (Reuters) - A senior Iranian military commander repeatedly warned Kurdish leaders in northern Iraq to withdraw from the oil city of Kirkuk or face an onslaught by Iraqi forces and allied Iranian-backed fighters, Kurdish officials briefed on the meetings said.

FILE PHOTO: Iranian Revolutionary Guard Commander Qassem Soleimani (L) stands at the frontline during offensive operations against Islamic State militants in the town of Tal Ksaiba in Salahuddin province March 8, 2015. REUTERS/Stringer/File Photo

Major-General Qassem Soleimani, commander of foreign operations for Iran’s elite Revolutionary Guards, traveled to Iraq’s Kurdistan region to meet Kurdish leaders at least three times this month before the Baghdad government’s lightning campaign to recapture territory across the north.

The presence of Soleimani on the frontlines highlights Tehran’s heavy sway over policy in Iraq, and comes as Shi’ite Iran seeks to win a proxy war in the Middle East with its regional rival and U.S. ally, Sunni Saudi Arabia.

Soleimani met leaders from the Patriotic Union of Kurdistan (PUK), one of the two main Kurdish political parties in northern Iraq, in the city of Sulaimania the day before Iraqi Prime Minister Haider al-Abadi ordered his forces to advance on Kirkuk, according to a PUK lawmaker briefed on the meeting.

His message was clear: withdraw or risk losing Tehran as a strategic ally.

“Abadi has all the regional powers and the West behind him and nothing will stop him from forcing you to return back to the mountains if he decides so,” the lawmaker quoted Soleimani as telling the PUK leadership.

The Iranian general evoked late Iraqi president Saddam Hussein’s massive attack on a Kurdish rebellion in 1991, when almost the entire Kurdish population fled northern Iraq to the mountains, the PUK lawmaker said.

“Soleimani’s visit ... was to give a last-minute chance for the decision-makers not to commit a fatal mistake,” said the lawmaker, who like others interviewed in this story declined to be identified because of the sensitivity of the issue.

Commanders of the Iraqi Kurdish forces, known as the Peshmerga, have accused Iran of orchestrating the Shi’ite-led Iraqi central government’s push into areas under their control, a charge senior Iranian officials have denied.

But Iran has made no secret of its presence in Iraq.

“Tehran’s military help is not a secret anymore. You can find General Soleimani’s pictures in Iraq everywhere,” said an official close to Iranian President Hassan Rouhani.

“Now, beside political issues, Kirkuk’s oil is a very key element for Iran, which is an OPEC member. Control of those oil fields by Iran’s enemies would be disastrous for us. Why should we let them enter the oil market?.”

“THERE WILL BE CONFLICT”

Kirkuk fell to Iraqi government forces on Monday. Their offensive followed a referendum last month in which the semi-autonomous Kurdistan region voted to secede from Iraq against Baghdad’s wishes.

Kurds have sought an independent state for almost a century, after colonial powers divided up the Middle East after the fall of the Ottoman Empire and left Kurdish-populated territory split between Turkey, Iran, Iraq and Syria.

But Iraq’s two main Kurdish parties have been at odds over both the referendum and the approach to the crisis in Kirkuk, which the Kurds consider to be the heart of their homeland.

The PUK, a close ally of Iran, accused its rival, the Kurdistan Democratic Party (KDP), of putting the Kurds at risk of military intervention and isolation by pushing hard for the vote, which won wide approval for independence.

Soleimani has been allied to the PUK for years, but the referendum has drawn him even closer to Kurdish politics and expanded Iran’s reach in Iraq beyond the Baghdad government.

The Iranian general is no stranger to conflicts in Iraq, which fought an eight-year war with Iran in the 1980s. He has often been seen in footage from the frontlines, and Iran has long helped Baghdad to carry out its military strategy through paramilitary Shi’ite militias which it funds and arms.

Before the referendum, Soleimani suggested to Kurdish leaders that holding a vote on secession -- which Iran feared would encourage its own Kurdish population to agitate for greater autonomy -- would be risky.

“The Iranians were very clear. They have been very clear that there will be conflict, that these territories will be lost,” said one prominent Iraqi Kurdish politician who met Soleimani ahead of the Sept. 25 referendum.

On Oct. 6, barely a week after the vote, Soleimani attended the funeral of PUK leader Jalal Talabani. Again, he wanted to make sure even his closest Kurdish allies understood the dangers of not withdrawing from Kirkuk, officials said.

A senior Iranian diplomat in Iraq and an official in Iran close to Supreme Leader Ayatollah Ali Khamenei’s office said Soleimani met with Kurdish leaders after Talibani’s funeral and urged them to withdraw from Kirkuk and in exchange Tehran would protect their interests.

Soleimani met with one of Talabani’s sons, Bafel, a few days after his father was buried, one of the PUK officials said.

“Soleimani said Abadi should be taken very seriously. You should understand this,” the official said.

An Iranian source in Iraq said Soleimani was in Kirkuk two nights before the Iraqi government offensive for “a couple of hours to give military guidance.” Iraqi intelligence sources said Tehran sent a clear signal to the PUK.

“We understand from our sources on the ground that neighboring Iran played a decisive role in making the PUK chose the right course with Baghdad,” one Iraqi intelligence official told Reuters.

KURDISH DIVISIONS

Tensions over the referendum and Kirkuk have deepened divisions between the two main political parties in northern Iraq. The KDP accused the PUK of betraying the Kurdish cause by capitulating to Iran and striking a deal to withdraw.

“The Talabani clan were behind the offensive on Kirkuk. They asked Qassem (Soleimani) for help and his troops were there on the ground,” said a source close to Massoud Barzani, president of the Kurdistan Regional Government and head of the KDP.

“It is becoming clear that Iran is directing the operations to destroy the KDP.”

The PUK strongly denies this. Talabani’s son Bafel accused the KDP of missing a zero-hour chance to avoid losing Kirkuk by failing to reach a deal over a military base which Iraqi government forces had demanded to take back.

“Unfortunately we reacted too slowly. And we find ourselves where we are today,” Bafel told Reuters.

Two other Kurdish political sources gave a similar account.

Iran and Soleimani offered early assistance to northern Iraq’s Kurds in the fight against Islamic State, a rallying point for the Kurdish community. But after the devastating loss of Kirkuk, Iraqi Kurds have been left disillusioned.

“They (both PUK and KDP leaders) just make decisions on their own and play with people’s lives. In the end, we pay the price,” said pensioner Abdullah Ahmed in Sulaimania. “This is a disaster for everyone. Everyone was united against Daesh (Islamic State). Now they are back just looking out for themselves.”