QUBA, Azerbaijan Oil money and well-equipped security forces have long ensured public loyalty to President Ilham Aliyev in the Azeri town of Quba, but after months of rising prices people turned out on the streets last week to protest.
Dragged down by the slump in world crude prices, Azerbaijan's manat currency has fallen by about a third against the dollar in the past 30 days, sparking public protests that could be a taste of unrest to come for other oil-funded economies.
It has prompted Aliyev to consider such measures as tightening currency controls, helping banks, and selling off state assets.
But the anger is mounting.
"Prices are rising, officials are corrupt, there are no jobs, we can't pay off credits," said 28-year-old Afqan, sitting in an empty tea shop in the centre of Quba, in the foothills of the Caucasus mountains.
Police have mobilised police in large numbers to stop such protests spreading in a year when Aliyev has courted publicity by securing the right to host the international Formula 1 motor race.
"Our protest was not organised ... We did not have a leader, but about 5,000 people came and protested, because we could not tolerate it any more," Afqan said.
After prayers in the mosques on Friday evening, people in Quba gathered in the main square of the town, 180 kilometres (110 miles) to the north of the capital Baku. The gathering was quickly broken up by riot police, who used water cannons, batons and tear gas. About 50 protesters were beaten and detained, witnesses said.
A day later, several heavily-armoured riot policemen were still standing in the town's centre, while additional police forces were stationed in buses nearby.
"The authorities are afraid of us, they are afraid that these small local protests may transform into something big," said Rustam, a 25-year-old resident of Quba, who also participated in the protest.
"We have nothing to lose, you know ... Those who are already wet are not afraid of rain."
Aliyev is firmly entrenched in office, helped by powers of patronage and well-equipped security forces, and there were no signs of any immediate threat to his hold on power.
Since he was elected to succeed his father Heydar Aliyev as president in a 2003 vote, he has overseen some of the fastest rates of economic growth in the world, at an average of 21 percent per year between 2003 and 2007.
Supporters say he has brought stability, modernisation and closer ties with Europe. Prestige projects have included hosting the Eurovision song contest in 2012 and the inaugural European Games last year.
But while the economy was flourishing, allegations of curbing freedoms and silencing dissent gained little traction.
Now the fall in the oil price has brought Azerbaijan's problems to the surface, not least its widespread corruption. Transparency International places Azerbaijan at 126 out of 174 countries in its global corruption ranking.
Quba, in an agricultural region near the border with Russia, is relatively well-off. A mountainous landscape makes it a tourist destination with hotels including an expensive Rixos.
Yet people in the town allege that customs officers demand bribes to let local exports of fruit and vegetables cross over the border into Russia.
A protest similar to the one in Quba erupted last week in Siyazan, a town 90 kilometres from Baku. It too was broken up by police. Residents say dozens of people were detained there.
At the weekend, all entries to Siyazan were guarded by police, although there are no visible signs of their presence within this small town.
"We lost our last hope," one resident, who declined to give his name for fear of the authorities, said of the aborted protest in Siyazan.
"But what can our small region do alone? If other regions also join the protest, we will be able to change something."
(Editing by Christian Lowe and Ruth Pitchford)