For Mr. Haki and the men with whom he was sheltered, the future was thrown into question yet again.

“We left a dangerous situation,” said Mr. Haki, who was transferred from a military camp near a muddy refugee encampment in Idomeni to a cramped apartment in a run-down Athens neighborhood after registering for the program with the United Nations refugee agency. “We hope every country will have an open mind. But after Brussels, I don’t know.”

Even before the bombings, Europe’s welcome was wearing thin. The new European Union accord with Turkey, which authorizes migrant deportations starting April 4, was sealed rapidly last week to dissuade asylum seekers from coming after more than one million reached Europe last year. Aid agencies withdrew some operations in Greece this week to protest the deal, which they say flouts international law.

Countries opposing a further migrant influx have also resisted implementing the European Union relocation accord, which is barely functioning. Under the pact struck in September, European countries agreed to take asylum seekers from Greece and Italy to help share the burden.

But Austria, Hungary and Slovakia have refused to comply. Others have dragged their feet: France has so far agreed to take just 1,300 migrants out of 19,431 places pledged, while Germany opened 40 spots out of 27,479. Belgium has made 30 places available out of 3,788. All told, fewer than 1,000 refugees have been relocated since the pact took effect.

Mr. Haki heard about the relocation plan at the military camp, where the United Nations refugee agency and aid organizations offer information and sign-ups.

Once registered, migrants can move into one of around 20,000 rooms in hotels, apartments and host homes funded by the United Nations and run by the Greek aid group Praksis, which provides food vouchers and medical care while the refugees await a decision on their applications.