CHENGDU, China — For months, Gu Baoluo had been looking forward to a boisterous Christmas celebration at one of China’s best-known Protestant churches. He loved decorating trees, singing songs like “Silent Night” and watching the annual Christmas pageant recounting the birth of Jesus.

But in early December, the police shut down Mr. Gu’s usual place of worship, the Early Rain Covenant Church in the southwest city of Chengdu, as part of what activists say is the most severe crackdown on Christianity in more than a decade. The police confiscated Bibles, shuttered a school and seminary run by the well-known church and detained Early Rain’s outspoken pastor on charges of “inciting subversion,” punishable in serious cases by at least five years in prison.

On Christmas Eve, Mr. Gu, 31, a rice seller, went to the only safe place to worship that he knew: a friend’s home, where he recited hymns and prayed for the two dozen Early Rain members that are in detention. Fearing that he and his friends might be arrested, Mr. Gu used encrypted chat apps to share information about surveillance and harassment by the police.

“We will not forfeit our faith because of suppression by the authorities,” Mr. Gu said.

As millions around the world gathered to celebrate Christmas, China is capping a year in which the government of President Xi Jinping has led an unrelenting campaign against unofficial churches in China, which by some estimates serve as many as 30 million people.