Kurds have voted in large numbers in an independence referendum in northern Iraq, ignoring pressure from the Iraqi government and threats from Turkey and Iran, as well as international warnings that the vote may ignite yet more regional conflict.
The vote, which is organised by Kurdish authorities, is expected to deliver a comfortable "yes" for independence, but is not binding.
However, it is designed to give Masoud Barzani, who heads the Kurdistan Regional Government, a mandate to negotiate the secession of the oil-producing region.
Turnout was 78% among 5.2 million eligible voters, the Kurdish Rudaw TV station said, and vote counting has started. Final results are expected within 72 hours.
For Iraqi Kurds - the largest ethnic group left stateless when the Ottoman empire collapsed a century ago - the referendum offers a historic opportunity despite intense international pressure to call it off.
At Sheikh Amir village, near the Peshmerga front lines west of Erbil in Iraq, long lines of Kurdish fighters waited to vote outside a former school.
Most emerged smiling, holding up ink-marked fingers.
In Baghdad, lawyer Adil Salman said the referendum resulted from the weakness of the Iraqi government.
"The scenario we're seeing now is of state disintegration," he said.
The Kurds also say the vote acknowledges their contribution in confronting the so-called Islamic State group after it overwhelmed the Iraqi army in 2014 and seized control of a third of Iraq.
However with 30 million ethnic Kurds scattered over international borders across the region, Iran and Turkey fear the spread of separatism to their own Kurdish populations.
Turkish President Tayyip Erdogan said his government could cut off the pipeline that carries oil from northern Iraq to the outside world, piling more pressure on the Kurds.
"After this, let's see through which channels the northern Iraqi regional government will send its oil, or where it will sell it," Mr Erdogan said in Istanbul.
"We have the tap. The moment we close the tap, then it's done."
The US State Department warned the Kurds last week that "holding the referendum in disputed areas is particularly provocative and destabilising."
The referendum is taking place not only in the Kurdish autonomous region of Iraq, but also in areas in the north of the country where Kurdish forces have advanced against IS. These areas also have large non-Kurdish populations.
Turkey said it did not recognise the referendum and would view its outcome as null and void, adding that the Iraqi Kurdish government was threatening the peace and stability of Iraq and the whole region.
Prime Minister Binali Yildirim said his government was evaluating possible punitive steps regarding its border with northern Iraq and air space in response to the vote.
Turkey would make decisions in more direct talks with the Iraqi central government after the referendum and economic, political, diplomatic and military steps were being discussed, he told Turkish broadcasters.
Turkey's forces are again fighting a Kurdish insurgency in Turkey following the collapse of a peace process.
Iran announced a ban on direct flights to and from Kurdistan yesterday, while the Iraqi government asked foreign countries to stop direct oil trading with the Kurdish region and demanded that the KRG hands over control of its international airports and border posts with Iran, Turkey and Syria.
Major General Yahya Rahim Safavi, a top military adviser to the Supreme Leader Ayatollah Seyed Ali Khamenei, said Iran regarded the referendum as "treason" against the Iraqi Kurds.
"Iran has blocked air traffic to this region but we are hopeful that the four neighbouring countries will block the land borders with Iraq too," he was quoted as saying by state news agency IRNA.
Iran supports Shia groups who have been ruling or holding security and government positions in Iraq since the US-led invasion which toppled Saddam Hussein in 2003.
Syria, embroiled in a devastating civil war and whose Kurds are pressing ahead with their own self-determination, rejected the referendum.
Iraqi Kurdish prime Minister Nechirvan Barxani said he hoped to maintain good relations with Turkey and the referendum was not a threat to the nation.
"The referendum does not mean independence will happen tomorrow, nor are we redrawing borders," he told a news conference in Erbil.
"If the 'Yes' vote wins, we will resolve our issues with Baghdad peacefully," he said.