Mr. Yasin’s troubles began in 2015, when neighbors recruited him as their leader in a dispute over compensation for demolished homes, he said. As the dispute heated up, the police detained Mr. Yasin. Officers stunned him with an electric prod and forced him and other residents to sign documents admitting to offenses, he said.

He was detained again after he tried to publicize the dispute on social media and by contacting journalists. This time, he said, he was beaten and tortured, then sent to a hospital to recover. While he was there, relatives made preparations to spirit him out of China along with his wife and infant daughter.

The family caught a plane to Kazakhstan in Central Asia, where they spent a month, then flew to Russia and finally on to Stockholm, where they applied for asylum in May 2015.

After nearly two years and an appeal, the couple were formally denied the right to stay. The Swedish Migration Agency accepted that Mr. Yasin was Uighur, but it did not believe his account of his escape, said Fedja Ziga, a lawyer who represented the couple and said he found their explanations to be consistent and reasonable.

After being denied, Mr. Yasin and his family slipped into Germany to seek asylum there. But after a year of waiting, they were sent back to Sweden under a European Union rule that says people can apply in only one country. At the Stockholm airport, waiting officials told them to find their way to Gavle, two hours away. They spent a first night there huddled on a bench.

The grinding fear has taken its toll on Mr. Yasin and his family, especially his wife, who did not want her name reported. She had been pregnant with their third child but suffered a miscarriage in late September.