Germany became an asylum seeker’s utopia, a beacon of hope for the war-weary and desperate. But following a string of terrorist attacks including last month’s strike on a Christmas market here, this nation is weighing tough changes to an asylum system that critics say has exposed millions of Germans to risk.

At a time when the incoming administration of President-elect Donald Trump has pledged a migrant crackdown in the United States, the moves in Western Europe’s most populous nation signal a harder line also forming on this side of the Atlantic.

Chancellor Angela Merkel, sniped at by Trump for welcoming the mostly Muslim migrants, remains opposed to some of the strictest proposals, including renewed pressure to set a firm cap on new asylum seekers, who are still arriving at a rate of several hundred per day. But in an election year in which Merkel’s refugee stance has become her Achilles’ heel, she and her top allies are accelerating a push for reform.

“You cannot apodictically separate security and asylum policy,” said Stephan Mayer, a senior German lawmaker from the ­center-right Christian Social Union.