BEIJING -- Thousands of Muslims gathered at a mosque in northwestern China on Friday to protest its planned demolition in a rare, public pushback to the government's efforts to rewrite how religions are practiced in the country. A large crowd of Hui people, a Muslim ethnic minority, gathered outside the towering Grand Mosque in the town of Weizhou on Thursday, local Hui residents told The Associated Press by phone.

"We just won't let them demolish it," said Ma Sengming, a 68-year-old woman who said her daughter was at the protest outside the newly built mosque in the region of Ningxia.

The protest comes as faith groups that were largely tolerated in the past have seen their freedoms shrink as the government seeks to "Sinicize" religions by making the faithful prioritize allegiance to the officially atheist ruling Communist Party. Islamic crescents and domes have been stripped from mosques, Christian churches shut down and bibles seized, and Tibetan children have been moved from Buddhist temples to schools.

Get Breaking News Delivered to Your Inbox

The residents of Weizhou were alarmed by news that the government was planning to demolish the mosque despite initially appearing to approve its construction, which was completed just last year.

The town's party secretary had even made a congratulatory speech at the site when the mosque's construction began, said Ma Zhiguo, a local in his late 70s.

The authorities planned to take down eight out of the nine domes topping the mosque on the grounds that the structure was built larger than permitted, Ma said. But community members were standing their ground, he added.

"How could we allow them to tear down a mosque that is still in good condition?" Ma Zhiguo said.

About 30,000 Muslims worship at the mosque, which was built with locals' personal funds, he said.

An official in the county propaganda office said he was not aware of the demolition. Other local authorities could not immediately be reached for comment.

Public demonstrations are rare in China, where the government is often quick to quash any hint of dissent. Under President Xi Jinping, the Communist Party is cracking down on religious expression and attacking what it calls radical ideas among the country's more than 20 million Muslims.

In the far west region of Xinjiang, following sporadic violent attacks by radical Muslim separatists, hundreds of thousands of members of the Uighur and Kazakh Muslim minorities have been arbitrarily detained in indoctrination camps where they are forced to denounce Islam and profess loyalty to the party.

Compared to those ethnic groups, the Hui are culturally much closer to China's Han majority, similar in appearance and speaking a variation of the mainstream Mandarin language.

Still, reports say authorities have shut down Hui religious schools and Arabic classes and barred children from participating in Muslim activities.