Walter Mugisha never meant to end up in Eleonas. When the computer technician left his native Uganda, Denmark was his goal, not a dusty camp in a former olive grove in the industrial moonscape of Athens.

For the 32-year-old, as for the vast majority of Syrian migrants and refugees making the perilous crossing from Turkey, Greece was a transit point, the route that would get him there. Athens was happy to oblige, waving through the estimated 850,000 men, women and children who have similarly landed on its shores, providing transport but never hosting the caravan of humanity that, over the course of a tumultuous 2015, wended its way from the Mediterranean, through the Balkan peninsula and further north into central Europe.

Mugisha, like so many, came with nothing. “Everything you see, the clothes I am wearing, I got here,” he smiles, stocky and sparkly eyed. “I arrived with my Bible, my shield, the one thing I kept close to my chest. And now, because I am not a Syrian, because I am not a war refugee, I am praying every day that I will be granted political asylum, that I will get to Denmark, that I will live my dream.”

With its numbered cabins and cavernous tents, basic amenities and sole basketball ring, Eleonas was only ever intended to be a stopgap solution for the migrant wave on the road through Greece. But bigger things – way beyond Greece’s control – have put an end to that. Across Europe walls have come down; barriers have gone up and rhetoric has swelled as EU member states, one after another in the wave of the jihadi attacks on Paris, have reinforced frontiers and closed their doors.

Migrants play soccer at the Eleonas refugee camp in Athens. Eleonas is filling up as thousands are prevented from continuing their journey north. Photograph: Alkis Konstantinidis/Reuters

Suddenly, Eleonas’s cabins are filling up, its residents, like Walter, prevented from continuing their journey north by nations no longer willing to accept anyone not deemed to be from a war-torn zone. And it may just be the beginning.

With Brussels contemplating drastic measures to stem the flow, calls are mounting to seal the Greek-Macedonian border, raising fears of hundreds of thousands being stranded in Greece, the country now perceived to be the continent’s weakest link.

The prospect of migrants being trapped in a member state that financially is also Europe’s most fragile may once have seemed extreme, even absurd. Its economy ravaged by six years of internationally mandated austerity and record levels of unemployment, Greece’s coping strategies are markedly strained. But as EU policymakers seek ever more desperate ways to deal with what has become the largest mass movement of people since the second world war, it is an action plan being actively worked on by mandarins at the highest level. Like so much else in the great existential crisis facing Europe, a proposed policy that was once seen as bizarre now looks like it could become real.

Last week Athens was also given a three-month ultimatum to improve the way it processes arrivals and polices its borders – at nearly 8,700 miles the longest in Europe – or face suspension from the passport-free Schengen zone. Closure of the Greek-Macedonian frontier would effectively cut it out of that fraternity.

Those who have watched Greece’s rollercoaster struggle to keep insolvency at bay are united in their conviction that the move would be catastrophic. “It would place a timebomb under the foundations of Greece,” says Aliki Mouriki, a prominent sociologist at the National Centre of Social Research. “Hundreds of thousands of refugees trapped in a country that is bankrupt, that has serious administrative and organisational weaknesses, with a state that is unable to provide for their basic needs?” The question hangs in the air while she searches for the right word. “What we would witness,” she adds, “would be the definition of dystopia.”

Like the mayors who have been forced to deal with the emergency on Greece’s eastern Aegean isles, federal politicians believe Turkey is the root of the problem. “With all due respect for a country that is hosting 2 million refugees, it is Turkey that must do something to stop the organised crime, the smugglers working along its coast,” Yannis Mouzalas, the minister for migration policy, told the Observer. “These flows are not Greece’s fault even if, it is true, we have been slow to set up hotspots and screening was not always what it should have been,” he said. “It is Turkey that turns a blind eye to them coming here. It is Turkey that must stop them. Why is Greece guilty? Because it doesn’t let them drown?”

Two months after the European Union decided to shower gifts on Ankara – taking the unprecedented step of paying it €3bn to staunch the exodus – Athens is still praying the deal will work. If Turkey can institute policies that will give incentives to Syrians to enter its labour market, crack down on the traffickers working along its western shores and successfully apply a readmission agreement, such measures could also be used in Jordan and Lebanon.

But optimism is in short supply. Turkey is pressing for more money amid grumbling that the initial payment has yet to be received as member states, led by Italy, bicker over the wisdom of having signed such an accord at all.

The timetable is pressing. In March, German chancellor Angela Merkel faces crucial regional elections, by which time she wants to have seen a tangible reduction in immigrant numbers. The European commission has also said a solution is not months but weeks away if the borderless Schengen area – the continent’s greatest achievement – is to survive.

Turkish gendarmes carry the body of a migrant onto a beach yesterday after at least 33 migrants drowned when their boat sank while trying to cross from Turkey to Greece. Photograph: Ozan Kose/AFP/Getty Images

“If Turkey fails to deliver, Europe’s next course of action will be to turn Greece into a de facto refugee camp by sealing the border on the Macedonia side,” says Mujtaba Rahman, the head of European analysis at Eurasia Group, a risk consultancy.

“Closing the Greek-Macedonian border would represent a huge political shock for Tsipras’s government, already struggling to implement economic reforms as part of its bailout,” says Rahman. “The government would become much less cooperative over other aspects of refugee policy … and Tsipras might see early elections as his only get-out, which would be very damaging for the economy, not to mention the politics given the current popularity of [neo-fascist party] Golden Dawn.”

Last week, as the idea of exchanging Athens’s staggering debt load for the hosting of refugees was also mooted, the rhetoric became even more shrill. “Such a bargain is unacceptable. Greece has its dignity,” fumed Athens’s normally mild-mannered mayor, Giorgos Kaminis. “We are not going to sell our dignity and our wellbeing for alleviating our debt.”

Kaminis’s frustration should not be underestimated. Away from Lesbos and Kos and the other islands on the frontline of the crisis, Athens has also been caught up in the storm, buffeted by the thousands who, at the height of the influx last summer, turned its parks and plazas into tent cities.

On its grimy streets and gritty central squares, the mood is one of quiet foreboding. In January alone more than 50,000 migrants and refugees poured into Greece despite the bad weather and choppy seas. At least 9% of those who pass through the Greek capital are, like Walter, unable to continue the journey north, according to the United Nations refugees agency, UNHCR.

Few are under any illusion about a decrease in the numbers. On Saturday at least 39 migrants, including several children, were drowned as they tried to make the sea crossing from Turkey to Greece. The Salvation Army, whose team works out of offices near Victoria Square, the main hub for the newly arrived, expects the influx to grow. Two weeks ago it opened a new day centre for refugees, where shipments from around the world of clothes, shoes and sleeping bags are stockpiled and stacked.

“Last year there was chaos, but it was chaos that moved,” says Polis Pandelides, a Salvation Army officer. “This year, with fences going up, all the signs are that it will be a static chaos with people being stuck here.”

Pandelides, who lived in Britain for years, exudes a Gandhian calm as he sits under the mulberry trees of Victoria Square, bantering with Omar and Ali, young Moroccans who arrived from Turkey on Monday and are now bent on reaching Sweden. Like Walter, both appear oblivious to Scandinavia’s new resolve to clamp down on migrants. “There’s a big problem in Greece, big problem, no money,” says Omar. “We will walk through the mountains [of Albania and Bulgaria] if we have to.”

Pandelides looks at those assembled in the square – the meeting place in a neighbourhood that, decrepit and poor, is a stronghold of xenophobic Golden Dawn. Almost all are like the two Moroccans, young, strong-willed, determined and wide-eyed.

“Nobody can predict what will happen,” Pandelides says. “But what we do know is that the problem will become massive, violence will increase, attitudes will change if there are thousands more and the government doesn’t find a way to return them or move them on.”