In just a few weeks the situation for Kurdish people in Iraqi Kurdistan has gone from euphoria to anger and fear.
On 25 September, 2.8 million people in Iraqi Kurdistan, 92% of voters, voted for independence. In the days around the vote, many people were full of hope, some declaring this to be the best time of their lives.
But the government of Iraq immediately called the referendum illegal, and the national Iraqi army, and Shia militias, moved into the disputed city of Kirkuk and its province.
Thousands fled, with reports of families being forced out and homes destroyed. By 19 October the Iraqi army had control.
It would appear that Kurdish Peshmerga (fighters) in the city under the control of the Patriotic Union of Kurdistan (PUK - one of two main capitalist parties that dominate the Iraqi Kurdish region) were withdrawn as the Iraqi army moved in, with very little fighting taking place. But fierce fighting is reported in other areas.
Iraqi federal courts have ordered the arrest of Kurdistan officials involved in overseeing the referendum, and now also the arrest of the Kurdish region vice president, for calling the Iraqi army "occupying forces".
The US and many European governments opposed the referendum, because of the risk of "destabilising the region" and "Iraq's territorial integrity".
Kurdish regional government president Masoud Barzani made it clear that this referendum would not be binding.
He mainly wants to use it as a bargaining chip in a longer process of negotiating for power with Baghdad, and does not necessarily want to upset the cosy relationships he has fostered with the US and Turkey.
Events are already clearly demonstrating that ordinary Kurdish people in Iraq can have no confidence in the capitalist leaders in Iraqi Kurdistan, or other regional or imperialist powers.
To achieve their genuine national aspirations as well as the decent living standards they have been fighting for, working class and poor Kurds can only rely on themselves and their real potential allies - the workers and poor of the whole region. Independent working class organisation and programme is vital.
The Kurds are the largest stateless nation in the world, with a population of 25-35 million divided mainly between Iraq, Iran, Syria and Turkey since the post-World War One agreement between western imperialist powers to carve up the region.
Kurds have been oppressed for decades in each country, but in the instability created since the 2003 Iraq War they developed autonomous areas in Iraq and Syria.
In the last few years, the rise of Isis and the battle against them has raised the possibility of breaking down imperialism's borders, giving the Kurds the opportunity to progress their national aspirations further.
Kirkuk was included in the referendum and is reported to have a majority Kurdish population (with sizeable Arab and Turkmen populations too), but it is not actually part of the Kurdish government-led region.
It has long been a battleground for control between Kurdish and Iraqi powers, because of its huge oil fields, including moving people to change the make-up of the population.
In the fight against Isis in 2014, when the Iraqi army backed away, Kurdish forces advanced. Oil has been a key element in the substantial autonomy of Iraqi Kurdistan.
They built a pipeline through Turkey to export oil via the Mediterranean, which has provided the main economic basis of the region. Without it, on a capitalist basis, Iraqi Kurdistan will be impoverished.
The Socialist Party and the Committee for a Workers' International fully support the right of the Kurdish people to self-determination including, if they so wish, full autonomous democratic rights within the state they live in, the establishment of independent states, or of a common state of all Kurds.
The very long-held democratic aspirations for national rights is obviously a dominating factor in the Iraqi Kurdistan referendum result.
But the referendum should also be seen in the light of the mass struggle in 2015 and 2016 against austerity attacks.
The region's oil wealth had fuelled big profits, but following the collapse of oil prices, the government and business loaded the crisis on to the working class.
These protests were preceded by demonstrations of youth inspired by the Arab Spring in 2011.
While in the referendum the interests of President Barzani and the working class and poor may appear to have temporarily coincided, for most ordinary Iraqi Kurds independence is about much more than just a new government. Attempts by Barzani to roll back are likely to lead to huge anger.
The two main rival parties in Iraqi Kurdistan are the Kurdistan Democratic Party (KDP) led by Barzani, and the PUK led by Jalal Talabani who has just died.
Both are seen as corrupt, exploiting the oil wealth for themselves, and in the lap of US imperialism. Talabani became president of Iraq with US backing after 2003.
They have deliberately fostered illusions in imperialism. One Kurd is quoted by the BBC saying "we didn't expect the US to be so hostile".
The legitimate aspirations of Kurds will not be secured through battles between nascent capitalist powers, who will all be prepared to whip up ethnic and national division and set people against each other, eg Arab against Kurd, in order to serve themselves.
There are reports of non-Kurds being forced from their homes, which, if true, must be opposed.
Nor will their future be secured through a reliance on western imperialist governments. The different imperialist powers, including the US and Russia, have never had the interests of Kurdish people at heart.
The US was prepared to collaborate with Barzani in 2003 against Saddam Hussein and currently view the Kurdish fighters in Syria as an ally against Isis.
But they are purely interested in their own power and economic interests, and they will support Kurdish aspirations only insofar as they do not conflict with that.
This happened most starkly in 1991, when George Bush encouraged an uprising against Saddam Hussein and then left the Kurds to be massacred. When it suits them, the US will just as readily abandon them.
Neither western powers nor repressive regimes in the region want the determination of Kurds to fight for independence in other areas to increase further, because of the deeper instability that would create, including the potential break-up of Turkey.
Already, as a result of advances made by the Kurdish People's Defence Force (YPG) in Syria (the fighting forces of the left-wing PYD - Democratic Union Party), a big conjoining area in both northern Syria and Iraq is under Kurdish control.
The Kurdish fighters have been extremely brave in their fight against Isis. But many of their gains have been made alongside airstrikes from Russia and the US.
The territories now under Kurdish control are populated by Arabs and Turkmen as well as Kurds. The Socialist Party has pointed out previously that for the YPG to secure popular support in those areas, it is vital to dissociate itself from imperialist powers and instead appeal to the mass of the population to organise together.
The YPG and PYD in Syria are linked to the PKK, the Kurdistan Workers Party, a guerrilla organisation with mass support in the Kurdish areas of Turkey, which has long fought for greater national rights.
Turkish president Erdogan has meted out vicious repression of Kurds in Turkey in the last two years as part of increasingly authoritarian measures to secure his own power base.
This has included whipping up hatred against the Kurds among Turkish people. The character of Barzani's regime in Iraq is demonstrated by the fact that he is an ally of Erdogan, and won't want to upset him too far, in case he decides to close down the oil pipeline.
It is clearly essential that there are mass Kurdish movements independent of all these capitalist powers.
By standing firm against all imperialist forces and reactionary regimes, and by championing the rights of self-determination, a movement could be built that would reach out to workers and the poor across the whole region.
An independent working class programme, to defend democratic rights, for jobs and homes, for the region's vast resources to be owned and controlled democratically for the benefit of all, could begin to draw together divided populations.
The greatest fear of the rich, big bosses and landowners, and their political representatives, would be the coming together of Kurdish, Iraqi, Turkish, Syrian and Iranian workers in a movement that could challenge local and imperialist governments, and capitalism itself.
A voluntary socialist confederation of the Middle East would enable all people to freely and democratically decide their own fates.