Nearly 20 years after it broke from the Soviet Union, Azerbaijan is seeing a deep religious revival, its ancient capital Baku dotted with new mosques and the call to prayer echoing through city streets.
Designated by the Organisation of the Islamic Conference as 2009's "Capital of Islamic Culture," Baku is this year embracing its Muslim heritage with a year's worth of concerts, festivals and conferences.
But amid the celebrations, some are accusing the government of seeking to re-impose Soviet-era religious controls and are raising alarm about the forced closures of several mosques. Authorities insist the measures are aimed at rooting out extremists and "foreign influence" on the country's moderate religious traditions.
For critics, however, the moves make a mockery of events celebrating Azerbaijan as a centre of Islamic faith.
"It is as if they were destroying the Opera House or Conservatory after being proclaimed Europe's capital of culture," said Ilgar Ibrahimoglu, a dissident imam and head of Azerbaijan's Centre for Freedom of Conscience and Worship.
An oil-rich republic of 8.7 million on the shores of the Caspian Sea, Azerbaijan is a mainly Shiite Muslim country like Iran to the south, though it also has close linguistic and ethnic links with mainly Sunni Muslim Turkey.
After more than seven decades of Soviet rule, the country is among the most secular in the Muslim world. But following its independence in 1991 the number of Muslim organisations in the country soared and the government estimates there are now nearly 1,800.
Since the start of the year, the government has introduced a raft of new measures aimed at regulating religious practice.
Under constitutional amendments approved in February, authorities are requiring religious organisations to register by September with a state committee on religion and have their teachings approved by the government-linked Caucasus Muslim Board.
New legal amendments, expected to be approved by parliament by the end of this month, will further ban foreign citizens from leading prayers in Azerbaijani mosques and require leaders of religious organisations to be approved by the state.
The government has also stepped up efforts against what it says are illegally built mosques. Two mosques have been demolished since the start of this year and at least two others - both built with funding from Turkey - have been shut down for allegedly violating building codes.
Officials say their efforts are no different from religious regulations in most Western countries and are directed only at barring extremists.
"In any country, the state and society need to know what kind of religious organisations exist and what they do," said Rabyyet Aslanova, the chair of parliament's human rights committee.
"Teachings that go against Azerbaijan's national interests have appeared in the country, from some groups that are prohibited in Western countries. Due to a lack of control, they found fertile ground in Azerbaijan," she said.
Authorities here have frequently raised concerns about the influence of foreign religious extremists from neighbouring Iran or Arab countries on Azerbaijani Muslims.
Officials have accused foreign-backed Islamic groups such as Hezbollah and Al-Qaeda of being involved in foiled plots to bomb Western targets in Azerbaijan, including the US, British and Israeli embassies.
But critics say authorities are exaggerating the threat posed by Islamic fundamentalists in order to justify increasing controls on religion.
"It is part of a general process of suppressing dissent in the country," said Ibrahimoglu, who is banned from preaching because of his criticism of the government.
"What they are doing now is a step backwards, a Bolshevik-style approach, not the approach of a democratic state," he said.
Still, many Muslims in Azerbaijan sympathise with the government's efforts. Outside the Juma Mosque in Baku's rambling Old Town, worshippers said they feared extremism taking root in Azerbaijan and supported increased oversight.
"To some extent religion must be under control," 28-year-old worshipper Djavid Gaibov said.
"Some religious movements are deceiving people, guiding them on the wrong path and drawing them into terrorist activities."