A refugee looks at the line in front of the Office of Immigration in Brussels on Dec. 1. (Virginie Nguyen Hoang for the Washington Post)

Straining to cope with the influx, European countries are sharpening measures to stop the flow of refugees and migrants amid heightened security concerns following the Paris attacks last month.

Greek leaders finally agreed this past week to hand over partial control of their borders to a European Union border agency, after coming under heavy criticism for months that they were not doing enough to screen the more than 700,000 asylum seekers who have arrived so far on Greek shores this year.

The debate over stricter controls on refugees and migrants has exposed deep divisions in Europe — where the 28 E.U. member states are divided over balancing humanitarian and security concerns. Those frictions have increased in the wake of revelations that two of the assailants in the Nov. 13 attacks in Paris arrived via the migrant trail.

European governments have been trying to pressure Greece to do more to secure its borders, as thousands more asylum seekers wash up every day. Greek authorities have struggled to perform cursory security screenings on the people arriving. Many do not have passports or other identification.

“There are a certain number of improvements that need to be done,” European Commission spokesman Margaritis Schinas said Thursday ahead of meetings focused on the European border security.

New steps agreed upon Friday will strengthen screenings, but the process will remain much weaker than in the United States and Britain, which investigate individual asylum seekers for months.

European interior ministers also gave preliminary approval to a new database to track the movements of airline passengers, a step that had been under discussion since 2007.

E.U. leaders pledged earlier this year to build special hot-spot reception centers on Greece’s islands to improve screening. But the new centers have not yet been completed, and they were designed to organize the distribution of the asylum seekers across Europe, not to perform rigorous security screenings. Tough screenings do take place, however, when refugees reach destination countries and claim asylum.

In Belgium, refugees go through four separate screenings after lodging their claims, but asylum systems are so overwhelmed that it can take weeks to do so.

In the rain-drenched line outside the main immigration office in the Belgian capital, Mohammed Abdeddaim, a 31-year-old Syrian Palestinian, was still trying to lodge his asylum case after arriving from Syria three weeks ago. He was told to come back in two weeks and feared that it was an effort to discourage him from staying.

“When I talk to the people, I don’t see a problem,” Abdeddaim said. “But when I hear what the politicians are saying, it sounds like they think we are crazy terrorists.”

Belgian authorities say they are not trying to deter asylum seekers but simply don’t have the capacity.

Abdeddaim left his family behind in Syria because the journey has become so perilous — not just the stormy sea crossing but also as Balkan countries, including Macedonia, impose tighter border controls. The number of migrants and refugees reaching Europe by sea dipped to 140,000 in November, down from 220,000 a month earlier, amid the crackdowns and worsening weather.

Other European leaders have been so alarmed by Greece’s handling of the refugees that several countries initiated quiet discussions to exclude Greece from Europe’s borderless zone, which enables people to travel within the continent without showing their passports.

“Information and intelligence sharing is a problem in Europe,” said Dimitris Avramopoulos, the European commissioner for migration, home affairs and citizenship. “To keep secrets today is a very naive approach.”

The security gaps have sparked a powerful debate within Europe about how to respond. Germany, which has opened its doors wide to asylum seekers, has pushed for other nations to do more to take in refugees. But a growing chorus of politicians from other nations is pushing for significantly tighter border controls.

“In order to have free internal borders we need functioning external border protection, and it is falling short,” said German Interior Minister Thomas de Maiziere.

European Council President Donald Tusk called for asylum seekers to be detained for up to 18 months as rigorous security screenings are performed, saying on Wednesday that Germany’s open-door approach was “dangerous.”

“If you want to screen migrants and refugees, you need more time than only one minute to fingerprint,” Tusk told the Guardian and five other European newspapers. “Today access to Europe is, simply speaking, too easy.”

In another measure, the European Union has also agreed to a 3 billion euro deal with Turkey under which the country is expected to take concrete measures to reduce the number of asylum seekers arriving in Europe and go after smuggling rings.

A day after the deal, Turkey arrested 1,300 asylum seekers, news agencies reported.

Melanie Ward, associate director at the International Rescue Committee, described the agreement as “deeply concerning” and “primarily designed to obstruct the movement of those seeking refuge in the E.U., which runs contrary to the E.U.’s basic founding principles.”

Amnesty International described it as a “stain on the E.U.’s conscience.”

Some European nations have argued that their asylum systems are simply overwhelmed.

In a recent interview with a German newspaper, French Prime Minister Manuel Valls said that it was “not possible” for Europe to accommodate any more refugees, adding that it is threatening the union.

In Germany, Chancellor Angela Merkel, who is under pressure for her open-door policy, has seen her ratings dip. “Paris changes everything,” said Markus Söder, the Bavarian finance minister.

Meanwhile, in Eastern Europe, where nations have been particularly opposed to taking in migrants, fences have been erected, while Macedonia has begun tightening its border.

“It’s unfair to make the refugees a scapegoat because of what’s happened in Paris,” said Vanessa Saenen, a spokeswoman for the U.N. refugee agency in Brussels. “It’s being manipulated by politicians for a debate that’s putting a really negative image of refugees. The end result is human misery.”

Meanwhile, new arrivals keep coming. Shivering in the queue outside the Brussels immigration office, Rihan Assi, 28, who arrived that morning with her husband and five children after fleeing Damascus, is perplexed by the associations being drawn between refugees and the Paris attacks.

“We didn’t have anything to do with it,” she said, her youngest child in a blanket in her arms. “We just want to leave the war, the killing, the explosions, the car bombs. We didn’t even think about where we were going, but we hope this is where we are going to stay.”

“Refugees are welcome” once read a banner that hung near the immigration office in the Belgian capital where asylum seekers queue to lodge their cases. Today it is gone, and the newly arrived fear the welcome has too.