IT WAS one of most memorable nights of my backpacking days – New Year's Eve 1981 in Istanbul, and the first night martial law had been lifted after a military coup the previous year.
artial law had been imposed after a violent period of killings by left- and right-wing gunmen. The army, seen as the bastion of stability, had imposed a dubious order, but now there was a night off.
And it was wildly availed of, with bars packed and locals out chanting in the streets, and backpackers like myself joining in.
Flags flew, and there was nationalist chanting which seemed to be just about kept in check by nervous soldiers.
I was reminded of all this while watching the scenes in Istanbul this weekend. Turkey has come a long way since 1981. It has undergone a major economic boom which has modernised the country and put it on the margins of the European Union.
However, there are serious tensions, and the volatility I saw when I was there is never far beneath the surface.
Turkey is a conundrum: a major Islamic country that is not Arab and that wants to be part of Europe and of the EU.
Yet at the same time, bolstered by a recent economic boom, it also wants to be a mini superpower in its own near Eastern neighbourhood.
Its economic boom has been phenomenal and widespread, in contrast to bankrupt Greece, its old enemy. Roles are reversed now.
The boom is also the reason for much of the current unrest. Turkey has young educated and westernised citizens who want the liberties and social rights that go with economic prosperity. It is the classic recipe, like Northern Ireland in the late 1960s.
But the country is ruled by a moderate Islamic government that is still quite religious – it wants to restrict alcohol sales, and last week forbade Turkish Airlines stewardesses from wearing red lipstick.
Importantly, it is also a government with increasing authoritarian tendencies. Prime Minister Recep Erdogan has let power go to his head, and has been issuing edicts on everything from salt use and beer drinking to Israel and Syria.
It looks like it has become too much for many of the country's marginalised groups – women, secularists, environmentalists – and although the unrest has died down for now, the tensions revealed could be the beginning of something much worse.
It is also inspired by the Arab Spring which was happening all around Turkey and has now come home to roost in Istanbul. It all started with a protest about protecting a park.
It goes without saying that instability in Turkey would be another major headache for the US and the EU.
Turkey is an EU applicant country, it is a major US and NATO ally and it is a bulwark against the other political unrest in the region. If its stability and prosperity unravelled, we would be landed with more trouble.
So important is Turkey to the US, for example, that Barack Obama recently sat in Tel Aviv airport with Israeli premier Benjamin Netanyahu and forced him to phone an apology to Prime Minister Erdogan for the killing of Turkish activists going to Gaza. The US needs its two allies to get along.
Meanwhile, Turkey's problem with the separatist Kurds is heading for a promising peace process. So, it's steady as it goes with Turkey. There is no reason for things to unravel if they are handled properly by the Turkish government.
Unfortunately, the language of the imperious Erdogan doesn't yet suggest any sense of a willingness to listen to the frustrations of his people. In which case, yet further trouble lies ahead.