The Commission of the European Union (EU) has told Greece that it has three months to come into compliance with its system of registering and processing migrants, or its borders will be sealed and migrants will be forced to remain where they landed.

The new Commission report, signed by Federica Mogherini and Frans Timmermans, demands that Athens act immediately to “regain control of its borders” to prevent migrant flight to central and Northern Europe.

The latest decision by the European Commission represents the culmination of growing frustration with Greece’s handling of the migrant crisis, with Commission officials already accusing Athens last month of having “seriously neglected” its duty to protect the bloc’s external borders.

In what seems an impossible request, Greece is being asked to recover the hundreds of thousands of migrants that have entered Europe through its territory and then disappeared into northern Europe, particularly into Sweden and Germany. Reports suggest that if the EU carries out its threat, Greece would be converted into “an open-air refugee camp.”

The Commission has formally warned Greek Prime Minister Tsipras that he must present a credible plan within three months, with monthly interim monitoring, to resolve the crisis.

The 78-page report stipulates that Greece tighten controls on the border with Macedonia, that it properly register all migrants arriving into Greece, process asylum applications, and detain migrants until they are fully processed — a procedure that could require months.

Those who have no right to remain, such as economic migrants, should be sent home, and those who qualify as refugees should be relocated in EU countries according to the plan proposed by Commission President Jean-Claude Juncker and approved by the EU Council, the report says.

The European Commission is reacting to Greece’s notoriously lax immigration controls, whereby most migrants are not registered but allowed to flee northward in an attempt to reach Germany or Sweden. The Commission calls on Athens to follow the rules, but also warns other European states to cooperate by accepting without complications relocated migrants. To date, this system has been a dismal failure, with only 279 relocated migrants from Italy, and just 21 from Greece.

Meanwhile, as Greece is being asked to tighten border controls with Macedonia, the EU is proposing a joint humanitarian operation in Greece together with the UN High Commission for Refugees (UNHCR), which would be the first operation of its kind launched in Europe since the Second World War.

If by May Greece does not have its house in order, the EU is threatening to abrogate the Schengen agreement and return to controlled borders. Austria has already made it known that they plan to build a barrier at the Brenner Pass, and a number of states are ready to erect fences to prevent the arrival of migrants.

Follow Thomas D. Williams on Twitter @tdwilliamsrome