"Every day I heard the sound of guns," said a 37-year-old surnamed Saeed of his former home Lahore, Pakistan's second city.
"We prayed every day, because we felt something could happen to us at any time."
He is one of hundreds of people who have sought asylum in China in recent years, often from conflict and violence-stricken countries including Iraq and Somalia.
The government tolerates their presence but provides almost no support, while human rights groups have for years condemned Beijing for deporting tens of thousands of asylum seekers who enter it to escape oppression in North Korea and Myanmar.
Also Read
They are among the most persecuted minorities in Pakistan -- a constitutional Islamic republic which bans them from calling themselves Muslims or going on the Hajj pilgrimage to Mecca.
In 2010 militants stormed two Ahmadi prayer halls, killing 82 worshippers in gun and grenade attacks, before targeting a hospital where victims were being treated. Ahmadi mosques and graveyards are regularly desecrated.
China is regularly condemned by the US State Department for its restrictions on religious freedom, which analysts say are key elements of the tensions it faces in Buddhist-majority Tibet and mainly Muslim Xinjiang.
But Saeed, who arrived four years ago, said: "From a security point of view, China is good.
"There is almost no terrorism compared to Pakistan, where there is killing and persecution of minorities every day," he told AFP in a rented apartment in Sanhe, a city outside Beijing where clumps of high-rise apartment blocks overshadow restaurants offering donkey meat burgers.