What happens when the world’s oldest travel company closes its doors? It leaves a lot of people very far from home and no clear way to get back. Thomas Cook collapsed overnight after 178 years of operation thanks to debt commitments that could not be met, leaving more than 150,000 people scattered across the globe with no way home and no paid accommodations.

The legendary firm’s CEO issued an apology, but that alone won’t do much:

The British government has been left with the task of finding Thomas Cook’s travelers and bringing them home. Think of this as a peacetime Dunkirk, only if Dunkirk was spread out all over the planet. The fleets of civilian aircraft have already begun their evacuation flights:

Hundreds of thousands of vacationers were in limbo on Monday after the world’s oldest travel firm, Thomas Cook, collapsed, prompting the largest peacetime repatriation effort in British history.

The company had gone out of business after it failed to secure a rescue package from its lenders, Chief Executive Peter Fankhauser said early Monday.

The U.K.’s Civil Aviation Authority confirmed that Thomas Cook had closed its doors, and the regulator and government were mobilizing a fleet of aircraft from around the world to bring more than 150,000 customers currently abroad.

The UK’s transport secretary pledged to make sure they brought every last traveler back home, but warned it would not be easy and that some patience might be required:

Unfortunately for some, those travelers whose journeys didn’t begin in the UK are flat out of luck. The repatriation effort only applies to those whose travel originated in British territory. There’s no clear number how many that leaves out in the cold, but it’s likely to be significant. Furthermore, the repatriation missions have a cut-off date of October 6th, after which everyone still left will have to find their own way home regardless of origination.

Even with the rescue flights on the way, travelers aren’t out of the woods. Hotels expecting to be paid by Thomas Cook have begun demanding direct payment from their guests, in some cases apparently preventing them from leaving until the bills are settled. The CAA is trying to contact the hotels to reassure them that they will be paid eventually, but that dispute might impact how easily travelers can access this massive repatriation effort.

So what happened? Like many other firms, bad management and debt finally killed Thomas Cook:

Thomas Cook was brought low by a $2.1 billion debt pile that prevented it from responding to more nimble online competition. With debts built up around 10 years ago due to several ill-timed deals, it had to sell three million holidays a year just to cover its interest payments.

As it struggled to pitch itself to a new generation of tourists, the company was hit by the 2016 coup attempt in Turkey, one of its top destinations, and the 2018 Europe-wide heatwave which deterred customers from going abroad.

Thomas Cook needed another 200 million pounds on top of a 900 million pound package it had already agreed, to see it through the winter months when it receives less cash and must pay hotels for summer services.

The request for an additional 200 million pounds torpedoed the rescue deal that had been months in the making.

The terms of Thomas Cook’s license with the British government includes a guarantee that the UK government would be on the hook to deal with stranded travelers in case of collapse. One has to wonder whether it might have been cheaper for the UK to simply take over Thomas Cook rather than let it collapse, at least for the short time in which they could unwind current itineraries. This kind of peacetime Dunkirk will have to end up costing more than the £200 million that Cook needed for short-term operations, anyway. Why not just kick in that amount in return for control of the company and a promise to wind down the rest for creditors after everyone got home? Yes, it would have been a bailout, but the licensing forces the UK into a bailout no matter what. Better to do it with the current infrastructure than with an ad hoc effort, one would think.

In the meantime, best of luck to all the stranded travelers. You’re going to need it.