In September 2014, the European Union’s press office released a striking, if difficult to verify, statistic. One million babies, it estimated, had been born as a result of the Erasmus Programme, which allows students within the EU to study in one another’s countries. The headlines it provoked fit neatly with the EU’s founding myth, which runs something like this: After the Second World War, European states came together in a spirit of cooperation, determined never again to repeat the horrors wrought by nationalism on their continent. As trade agreements have brought down borders between states, and European citizens have been able to travel more freely than ever before, the EU has become a beacon of democracy and human rights to the rest of the world.

Yet the triumphalism of this story sits uneasily with the scenes of misery and death that have become commonplace at Europe’s borders. Right now, there is widespread public shock at the photo of Alan Kurdi, the Syrian toddler who drowned with family members as they took an unsafe smuggler boat from the Turkish coast in an attempt to reach Greece. It feels like a tipping point. But so, too, did the disastrous shipwreck off the coast of Libya in April, where more than 800 people died. Then, European leaders declared themselves “chagrined” by the failure to protect human life in the Mediterranean and promised a swift response. Instead, little has been done. Tens of thousands of migrants fleeing war or poverty in the Middle East and Africa are still taking perilous routes across the EU’s external borders, only to find that their journeys don’t end when they reach Europe. A chaotic asylum system forces many refugees into destitution as they try to find a country that will give them the chance to rebuild their lives.

The situation almost defies comprehension. While the world is experiencing an acute refugee crisis—more people are displaced by conflict now than at any time since the Second World War, according to the UNHCR—only a small proportion of those refugees are journeying to Europe. The numbers should be sustainable: Last year, 626,065 people claimed asylum in the EU, which has a total population of more than 500 million. There won’t be any easy “solution” to the refugee crisis—civil war in Syria, the collapse of the Libyan state, and population movements driven by global inequality and climate change are all problems that will take many years to resolve—but the measures that would allow Europe to treat migrants in a humane and dignified manner are, on the face of it, simple enough. “Instead of resisting [migration], we should organize it,” argued the UN’s special rapporteur on the human rights of migrants, François Crépeau, in April. He proposed safe, legal routes to asylum for refugees and a visa scheme for migrants coming from outside the EU in search of work. Why, then, the paralysis—is Europe unable, or unwilling, to act?

Partly, it is a problem of structure. The EU, a 28-member bloc whose constituent states each have their own national legal and political systems, began as an economic union and has moved only fitfully toward political integration. The 2007 Lisbon Treaty, for instance, gave an enhanced role to the post of high representative for foreign affairs, currently held by Federica Mogherini, but many important decisions are still made by negotiation between the representatives of national governments. The emergency summits held since April—to discuss search-and-rescue operations in the Mediterranean, initiatives to combat people smugglers, and resettlement quotas for refugees who have arrived in southern Europe—have been conducted by the council of EU foreign ministers, each of whom must answer to a national parliament. National governments are perfectly capable of sluggish responses to humanitarian crises—Italy after the L’Aquila earthquake of 2009, or the United States after Hurricane Katrina in 2005, spring to mind—but the EU has an added layer of bureaucracy that hinders its ability to act in a swift and unified manner.

It’s not just this, however. The crisis at Europe’s borders is not a natural disaster; it is one of Europe’s own making. The flipside of the Schengen agreement, the treaty that gives most EU citizens the right to travel freely across European borders, has been the creeping militarization of Europe’s external frontiers. In recent years, to combat the supposed threat of “illegal immigration”— a specter that elicits as much fear in European politics as it does in the United States—Europeans have invested heavily in border defenses. Frontiers that only a few years ago were lightly patrolled, such as the Greek and Bulgarian borders with Turkey, are now equipped with sophisticated fences and a heavy police presence. In the Mediterranean, the Italian navy’s search-and-rescue operation Mare Nostrum was replaced at the end of 2014 with a scaled-down EU initiative, Triton. A 2014 report by Amnesty International found that between 2007 and 2013, the EU had spent nearly 2 billion euros on protecting its external borders but only 700 million on improving asylum-reception conditions. The existing attempt to create a common asylum system, known as the Dublin Regulation, has collapsed because it is structured to keep migrants away from the richer northern European states and insists that refugees be processed in their country of arrival. Frontline countries like Italy and Greece have been unable to cope.

These policies are based on the premise that “genuine refugees,” who are entitled to protection under international law, can be neatly separated from unwanted “economic migrants,” but in practice both fall foul of European border regimes. NGOs such as Amnesty, Human Rights Watch, and the Germany-based Pro Asyl have collected numerous reports of beatings and “push-backs”—the forcing of asylum seekers back out of the EU, which is illegal under international law—at the external borders. Inside the EU, prolonged detention of migrants in inhumane conditions has become widespread: Britain detains asylum seekers for unlimited periods; Greece’s detention centers have been widely condemned for their mistreatment of inmates. European ministers have sought to blame people-smuggling networks for the boats crisis in the Mediterranean, but EU law itself bears some of the responsibility. Refugees are unable to board ferries or planes bound for the EU because of a 2001 directive that obliges transport carriers to check the immigration status of passengers before they travel, or else pay the costs of their deportation. A lack of safe and legal routes to asylum is what feeds the smuggling business.

Yet to address these issues would require steps—further integration, more open border policies—that are politically toxic right now in many European countries. The aftermath of the economic crisis, in particular the bullying, anti-democratic way in which European financial institutions have forced austerity policies on the weaker eurozone members, has corroded public trust in mainstream politicians. Discontent has benefited anti-establishment movements of both left and right, but in many countries it has contributed to the growth of anti-immigration politics. Hungary’s Viktor Orbán, the right-wing prime minister of a country where a fascist movement, Jobbik, is the third-largest party, is fast becoming the voice of a racism many wish had been consigned to the past. In a speech in June, he declared that migrants threaten “European civilization” and that Hungary, in building a fence to keep out refugees, was defending “Christian Europe” from the alleged horrors of a multicultural society.

As negotiations over the resettlement of refugees from Italy and Greece drag on, a split has developed between the former Eastern bloc states of Hungary, the Czech Republic, Poland, and Slovakia, which are opposed to mandatory resettlement quotas; and Germany, France, and Italy, which support them. Yet Germany, which now poses as the savior of Syrian refugees and recently announced it would allow all Syrians on its territory to apply for asylum there rather than returning them to other EU countries, was an architect of the border policies that made this crisis so bad in the first place, and shows no desire to dismantle them. Britain, which faces a referendum on European membership by 2017, has made a lot of noise about resettling a token amount of Syrian refugees, but has opted out of the quota negotiations. It has also been reluctant to support an effective search-and-rescue operation in the Mediterranean, initially claiming that saving people from drowning would create a “pull factor” that would only encourage more to make the journey. Europe might wish its past was behind it, but this remains the continent that gave birth to empires that colonized large parts of the planet, driven by a racist ideology that made white Europeans lords of all they surveyed. Today, the role of EU members in wars and exploitative trade agreements with poorer nations is rarely discussed in relation to the migration crisis. What’s happening at the borders suggests that it’s not only American elites who need to be told that black lives matter.

The ongoing crisis is above all a disaster for the migrants, but it is also beginning to threaten Europe’s own agreements on free movement—one aspect of European integration that many progressive critics of the EU are still willing to defend. Last month, German Chancellor Angela Merkel raised the possibility that a failure to agree on resettlement quotas would lead to the reintroduction of border controls between EU states. On Sunday, Germany closed its border with Austria, temporarily reintroducing passport checks. Already, the spectacle of thousands of refugees walking across the Balkans, or having numbers inked on their arms by Czech authorities, has raised uncomfortable historical echoes. In The Origins of Totalitarianism, Hannah Arendt argued that Europe’s failure to accommodate the millions of people displaced by the First World War played a crucial role in the construction of police states in the decades that followed. This is a different era, but some of the same questions persist: Does Europe want to be a continent riven by fences and detention centers that segregate undocumented migrants from mainstream society? What long-term effects will these policies have on our democracy?

In 2012, the European Union was awarded the Nobel Peace Prize. “As a community of nations that has overcome war and fought totalitarianism,” declared the then-president of the European Commission, José Manuel Barroso, “we will always stand by those who are in pursuit of peace and human dignity.” If Europe’s politicians have failed in this mission when it comes to the refugee crisis, then perhaps its people will have to show them the way. Across the continent, many thousands of European citizens have taken part in solidarity efforts to provide food, shelter, and support to the people arriving on their doorstep. In the French port of Calais, where thousands of migrants sleep rough as they try to reach the UK, a library set up by a British volunteer has received so many donations of books that it has run out of space. In Hungary, people have handed out food to the Syrians, Afghans, and others who were held at Budapest’s Keleti train station by police who wanted to prevent them from traveling on to Germany. And on the Greek islands, where a record number of people have arrived in boats from Turkey, a network of local groups is working hard to provide support where the Greek state—and the EU—has failed. There are signs that policymakers are finally responding to the facts on the ground, such as the proposal on Wednesday by Jean-Claude Juncker, current president of the European Commission, of a quota plan to resettle 160,000 refugees. This is an improvement on the previous target of 40,000, proposed earlier in the summer, but still relatively modest: Turkey, for example, is home to nearly 2 million refugees from Syria alone. 

The irony is that with an ageing population, Europe needs migration to secure its future prosperity. According to the Organization for Economic Cooperation and Development (OECD), Europe needs to add an extra 50 million immigrants to its workforce by 2060 to avoid stagnation. Migrants, though, are not a means to an end—they, like everyone else, deserve humane and dignified treatment, whatever their economic worth. But to turn popular solidarity into political solutions will pose some deeper questions about how European society is organized and in whose interests. If capital, goods, and communication can cross borders with unprecedented freedom, then why can’t people?