British travel group Thomas Cook on Monday declared bankruptcy after failing to reach a last-ditch rescue deal, triggering the UK’s biggest repatriation since World War II to bring back tens of thousands of stranded passengers.

The 178-year-old operator, which had struggled against fierce online competition for some time and which had blamed Brexit uncertainty for a recent drop in bookings, had been desperately seeking £200 million (US$250 million) from private investors to avert collapse.

The news leaves a reported 600,000 tourists stranded worldwide, including about 150,000 holidaymakers seeking help from the British government to return home.

In a statement published in the early hours of Monday morning, Thomas Cook said that “despite considerable efforts” it was unable to reach an agreement between the company’s stakeholders and proposed new money providers.

“The company’s board has therefore concluded that it had no choice but to take steps to enter into compulsory liquidation with immediate effect,” the statement added.

The UK government said it had hired planes to fly home British tourists, in an operation starting immediately.

“Following the collapse of Thomas Cook and the cancellation of all its flights, Transport Secretary Grant Shapps has announced that the government and UK Civil Aviation Authority has hired dozens of charter planes to fly customers home free of charge,” a statement said, describing it as the largest repatriation in peacetime history.

“All customers currently abroad with Thomas Cook who are booked to return to the UK over the next two weeks will be brought home as close as possible to their booked return date,” the government added.

Both a tour operator and an airline, the travel giant’s key destinations were in Southern Europe and the Mediterranean, but it also offered holidays in Asia, North Africa and the Caribbean.

Thomas Cook chief executive Peter Fankhauser called it a “deeply sad day,” with thousands of jobs lost.

“It is a matter of profound regret to me and the rest of the board that we were not successful,” he said.

“This marks a deeply sad day for the company which pioneered package holidays and made travel possible for millions of people around the world,” he added in the group’s statement.

The firm’s creditors held a marathon meeting on Sunday to try and work out a deal, followed by a meeting of the board of directors.

Up to 600,000 stranded

Reports said a collapse of the group would mean the repatriation of 600,000 tourists, including about 150,000 seeking government help returning to the UK.

Two years ago, the collapse of Monarch Airlines prompted the British government to take emergency action to return 110,000 stranded passengers, costing taxpayers some £60 million on hiring planes.

As well as the grounding of its planes, Thomas Cook has been forced to shut travel agencies, leaving the group’s 22,000 global employees – 9,000 of whom are in Britain – out of a job.

Chinese peer Fosun, which was already the biggest shareholder in Thomas Cook, agreed last month to inject £450 million into the business as part of an initial £900 million rescue package.

In return, the Hong Kong-listed conglomerate acquired a 75% stake in Thomas Cook’s tour operating division and 25% of its airline unit.

“Fosun is disappointed that Thomas Cook Group has not been able to find a viable solution for its proposed recapitalization with other affiliates, core lending banks, senior noteholders and additional involved parties,” the Chinese group said in a statement on Monday.

Cabinet maker Thomas Cook created the travel firm in 1841 to transport temperance supporters by train between British cities.

It soon began arranging foreign trips, being the first operator to take British travelers on escorted visits to Europe in 1855, to the United States in 1866 and on around-the-world trips in 1872.

Thomas Cook grew into a huge operation, becoming both a tour operator and an airline, but fell into massive debt despite recent annual turnover of £10 billion from transporting about 20 million customers worldwide.