ANKARA (Reuters) - Turkey opposes independence for a Kurdish state in northern Iraq and wants a unity government in Baghdad to counter the threat by Islamist Sunni rebels who have seized large swathes of territory in recent weeks, Turkish officials said.

Iraqi Kurds have benefited from the recent turmoil sweeping the country by occupying territory abandoned by government forces fleeing the advance of Sunni fighters led by the Islamic State in Iraq and the Levant (ISIL), which took Iraq’s second city Mosul earlier this month.

Turkey has good relations with the semi-autonomous Kurdish Regional Government (KRG) in Iraq but would not support moves to push for independence from Baghdad, a Turkish government official said in response to questions from Reuters on Monday.

“Turkey’s position is for the territorial integrity and political unity of Iraq, that’s it,” the official said anonymously, in order to speak more freely.

“(We) are not in favor of any independence, that would be detrimental to that unity. Nothing like that could be discussed,” the official stated, adding that Ankara is backing calls for the creation of a consensus or unity government to represent the interests of all Iraqis.

There has been mounting speculation over the past few weeks that Ankara’s poor relations with the central Shi’ite-led government of Iraqi Prime Minister Nuri al-Maliki could lead to Turkey accepting or supporting a Kurdish breakaway from Baghdad.

Comments in the Financial Times on Saturday by Huseyin Celik, a spokesman for Turkey’s ruling AK Party, have been interpreted as suggesting Ankara would tolerate an independent Kurdish state if Iraq were to fall apart.

“If Iraq is divided and it is inevitable, they are our brothers... Unfortunately the situation in Iraq is not good, and it looks like it is going to be divided,” Celik was quoted as saying.

However another Turkish official at the prime minister’s office last week appeared to pour cold water on the idea, telling Reuters that “the integrity of Iraq is very important to Turkey”.

Turkey has in the past been cool to efforts for greater autonomy for Iraqi Kurdistan for fear of stirring up separatist feelings among its own Kurds, who fought a decades-long insurgency in which an estimated 40,000 people were killed.

Peace talks led to a cease-fire in that conflict last year.

This year, Turkey allowed Iraqi Kurds to pipe oil to export for the first time, pumping it to a Turkish port over Baghdad’s objections.

The first tankers of Kurdish oil were bought in recent weeks by Israel, whose Prime Minister Benjamin Netanyahu voiced support for Kurdish statehood on Sunday, taking a position that appeared to clash with the U.S. preference to keep Iraq united.

The Kurds have seized on the recent sectarian chaos in Iraq to expand their autonomous northern territory to include Kirkuk, a city they consider their ancestral capital, perched on vast oil deposits that could support an independent state.

Kurdish officials say the ISIL advance has transformed Iraq, requiring a renegotiation of the settlement in place since the fall of Saddam Hussein in 2003, under which they rule themselves but remain within Iraq in return for a fixed percentage of its overall oil revenue.

Iraq’s five million Kurds have ethnic compatriots in Iran, Syria and Turkey, and have so far hesitated to declare full independence, in part to avoid angering neighboring countries.

Turkey has in recent years pursued deeper ties with Iraqi Kurds, partnering up in the exploration and production of oil fields in Iraqi Kurdistan and signing multi-billion dollar oil and gas deals last November.