Worshippers passed quietly through metal detectors as they entered the central mosque in China's far western city of Kashgar under the stern gaze of police officers.
The increasingly strict curbs imposed on the mostly Muslim Uighur population have stifled life in the tense Xinjiang region, where beards are partially banned and no one is allowed to pray in public.
For years, the square outside the mosque in Kashgar was packed with crowds at the end of Ramadan as worshippers jostled for space to unroll their prayer rugs. But no longer.
This year, an eerie silence hung over the plaza outside the imposing prayer hall as devotees gathered to mark the end of a month of fasting - the lowest turnout in a generation according to residents.
Authorities declined to comment on the numbers. But local businessmen said the government had used the numerous checkpoints encircling the city to prevent travellers to Kashgar from joining Eid prayers.
"This is not a good place for religion," said one trader.
Beijing says the restrictions and heavy police presence seek to control the spread of Islamic extremism and separatist movements, but analysts warn that Xinjiang is becoming an open air prison.
China is "essentially creating a police state of unprecedented scale", said James Leibold, an expert on Chinese security at Australia's La Trobe University.
The government began ramping up security and religious restrictions in Xinjiang in 2009, following a series of riots in the regional capital Urumqi that left about 200 dead.
In March, President Xi Jinping ordered security forces to build a "great wall of steel" around the region after Uighurs claiming to belong to a division of ISIL in Iraq threatened to return home and "shed blood like rivers".
Over the past year, Beijing has flooded Xinjiang with tens of thousands of security personnel, placed police stations on nearly every block, and rolled out tough regulations aimed at "eliminating extremism".
Public signs say no one is permitted to pray in public or grow a beard before the age of 50, while government employees are forbidden from fasting during Ramadan.
In Tashkurgan, near the Pakistan border, authorities shut a halal restaurant as "punishment" for refusing to serve food during the holiday, according to a shopkeeper working next door.
According to a teacher and a government official, schools discourage students from using the traditional Arabic Muslim greeting "As-Salaam Alaikum".
"The government thinks this Islamic word is equal to separatism," the official said.
The region's ubiquitous surveillance cameras are particularly abundant in places of worship: an empty mosque in the southern city of Yarkand had three of them pointing directly at the spot where the imam leads prayers. Even more hung from the wooden rafters like bats.
At police stations, officers monitor screens with direct feeds from mosques as well as other buildings and nearby streets.
In the run-up to Eid in the south-western desert oasis town of Hotan, police manned checkpoints with rifles and crude spears made from metal pipes.
At one intersection, men in bulletproof vests stopped traffic for a fleet of dozens of heavily armoured trucks, personnel carriers with mounted guns and black vans.
The caravans patrolled the city every day during the month of Ramadan, a police officer said.
At a mosque in the heart of Hotan, Muslims gathering for Friday prayers passed through a police barricade and showed identity documents at two checkpoints before entering.
Inside, plainclothes men with Communist Party lapel pins and sunglasses kept a close eye on hundreds of worshippers.
At the front of the mosque, an electronic signboard reminded people that "the greatest task for Xinjiang's masses is harmonising ethnic unity and religion".
Such signs are common throughout Xinjiang, where tensions between Uighurs and the majority Han ethnic group have led to violence.
Chinese authorities have long linked their crackdown on Uighur Muslims to international counter-terrorism efforts, arguing that separatists are bent on joining foreign extremist groups such as Al Qaeda.
Uighurs have been tied to mass stabbings and bombings that have killed dozens across the country in recent years. Riots and clashes with the government killed hundreds more.
Worries about extremism notwithstanding, many Xinjiang residents fear the loss of their cultural identity and question whether the government has gone too far.
"We don't want it to become another Pakistan or Afghanistan," a shopkeeper in Tashkurgan said, fearing violence could spill into China from the nearby countries.
But, he added, "only a small minority of Muslims are extremists. The Chinese government can't differentiate."