The president of Iraqi Kurdistan called on Turkey's Kurds to back a flagging peace process with Ankara on Saturday, making his first visit to southeastern Turkey in two decades in a show of support for Prime Minister Tayyip Erdogan.
Masoud Barzani's trip to Diyarbakir, the main city in Turkey's Kurdish-dominated southeast, comes as Ankara finalises billions of dollars of energy deals with his semi-autonomous region and amid mutual concern over the ambitions of Kurdish militias in the chaos of neighbouring Syria.
Thousands gathered to hear Barzani and Erdogan speak, opening a day of ceremonies including a performance by Kurdish poet and singer Sivan Perwer, who had fled Turkey in the 1970s, and a wedding of 400 couples.
"This is a historic visit for me ... We all know it would have been impossible to speak here 15 or 20 years ago," Barzani said, as members of the crowd waved green, white and orange Kurdistan flags.
"Prime Minister Tayyip Erdogan has taken a very brave step towards peace. I want my Kurdish and Turkish brothers to support the peace process," he said.
Kurds, often described as the world's largest stateless ethnic group, number about 30 million, concentrated in parts of Turkey, Iran, Syria and Iraq. While they have had partial autonomy in Iraqi Kurdistan since 1991, nationalist movements have long been suppressed in Turkey, Syria and Iran.
Erdogan had billed Barzani's visit as the "crown" on efforts to end a three-decade insurgency in Turkey by Kurdistan Workers Party (PKK) militants, a conflict which has killed 40,000.
Turkey's effort to make peace with the PKK has been given a sense of urgency by Syria's 2-1/2 year civil war in which Kurds have made major territorial gains, paving the way for their long-declared plans for independent governance in parts of Syria just over Turkey's southern border.
Erdogan is keen to press the peace process in the run-up to municipal elections next March, with his ruling AK Party looking to tempt Turkish Kurds away from the pro-Kurdish Peace and Democracy Party (BDP), which shares the same grassroots support as the PKK and governs Diyarbakir.
But peace moves have stalled since a ceasefire declaration in March, with the PKK saying reforms announced by Ankara last month, meant to boost Kurdish rights, had fallen well short of expectations.
On the eve of Barzani's visit, the Turkish army said Kurdish militants attacked a military convoy near the Syrian border with rifle fire and a rocket-propelled grenade, one of the most serious breaches of the 8-month-old truce.
"Yesterday, bullets were fired against the peace efforts. We won't allow this. If you own the process, it will grow more," Erdogan said in a speech in which, according to officials, he used the term "Iraqi Kurdistan" for the first time.
"Be in no doubt, we will see (PKK fighters) come down from the mountains and the jails empty," he said, referring to the mountains of northern Iraq where the PKK has bases.
But across town, hundreds attended a counter rally by the BDP, which has dismissed Barzani's visit as an AK Party show. "Barzani, will you be a candidate for the AKP in Diyarbakir?" read the banner on a party bus.
"Barzani should take into consideration the sensitivities of the Diyarbakir people," BDP official Mehmet Amin Yilmaz said in an address to the crowd. "Erdogan has not taken concrete steps for the rights of the Kurdish people."
Turkey and Iraqi Kurdistan share concern about the growing clout of Kurdish militias in Syria, particularly after their announcement this week of an interim administration that aims to carve out an autonomous Syrian Kurdish region.
Both Turkish and Iraqi Kurdish officials in Arbil have criticised the declaration, which lays out plans for a regional government similar to that of Iraqi Kurdistan, seeing it as part of a deal with Syrian President Bashar al-Assad.
Syrian Kurds are divided over the political group whose militias are behind the advances, the Democratic Union Party (PYD), which has links to the PKK and is seen by Iraqi Kurdistan as a rival for transnational leadership of the Kurds.
Critics of the PYD also accuse it of getting help from outside powers, namely Shi'ite Iran and Iraq's Shi'ite-controlled central government, which are both allies of Assad.
"Erdogan needs to strengthen his hand with Barzani in Turkey's own Kurdish problem and in developments with Syrian Kurds," wrote columnist Cengiz Candar in Turkey's Radikal daily. "But Barzani also needs to get Turkey's backing in Iran, Syria and Baghdad," he said.
Turkey's courtship of Iraqi Kurdistan, in particular its efforts to help the region develop an independent oil industry, has long infuriated Baghdad, which fears the break-up of Iraq, and has also raised concerns in Washington.
The semi-autonomous region has finalised a package of deals with Turkey to build multi-billion-dollar pipelines to ship its oil and gas to world markets, sources involved in the negotiations told Reuters last week.
But in a delicate foreign policy balance, Ankara has at the same time been seeking to restore relations with Baghdad, which claims the sole authority to manage Iraqi oil, vowing to respect Iraq's territorial integrity and offering to set up an escrow account through which oil revenues could be shared.
Columnist Fehim Tastekin wrote on Middle Eastern news website Al-Monitor: "What (Erdogan's) dancing with Arbil and Baghdad at the same time promises to the three parties is simple: if oil and natural gas flow through pipelines with an agreement among the parties, all three will win."