Thomas Cook has collapsed after last-minute negotiations aimed at saving the 178-year-old holiday firm failed.

The UK Civil Aviation Authority (CAA) said the tour operator has “ceased trading with immediate effect”.

It has also triggered the biggest ever peacetime repatriation, aimed at bringing more than 150,000 British holidaymakers home.

Peter Fankhauser, Thomas Cook’s chief executive, said the firm’s collapse was a “matter of profound regret”.

Commenting as the company entered compulsory liquidation, Mr Fankhauser also apologised to the firm’s “millions of customers, and thousands of employees”.

The tour operator’s failure puts 22,000 jobs at risk worldwide, including 9,000 in the UK.

Transport Secretary Grant Shapps said the company’s collapse was “very sad news for staff and holidaymakers”.

He urged holidaymakers to be “understanding with staff” amid the “enormous” task of bringing people home.

Mr Shapps has announced that the government and CAA has hired dozens of charter planes to fly customers home free of charge.

The emergency operation, codenamed Operation Matterhorn, is aiming to bring home Britons currently on holiday with the firm.

On Sunday, empty aircraft had already started to be flown overseas, ready to bring British tourists back to the UK on Monday.

One of the world’s best known holiday brands, the business was founded in 1841 in Leicestershire by cabinet-maker Thomas Cook.

How will holidaymakers get home?

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 Department for Transport (DfT) has said.

Customers will be brought home to the UK on special free flights or booked onto another scheduled airline at no extra cost.

Flights will start operating from Monday, with details of each flight to be posted on a dedicated website as soon as they are available.

The DfT added that a “small number” of passengers may need to book their own flight home and reclaim the costs.

Customers have been urged not to cut short their holiday or go to the airport without checking the website for more information about their return journey.

The CAA is also contacting hotels accommodating Thomas Cook customers, who have booked as part of a package, to tell them that the cost of their accommodation will be covered by the government, through the Air Travel Trust Fund and Air Travel Organiser’s Licence scheme (Atol).

The CAA said in a statement: “All Thomas Cook bookings, including flights and holidays, have now been cancelled.

“We know that a company with such long-standing history ceasing trading will be very distressing for its customers and employees and our thoughts are with everyone affected by this news

Tim Johnson, policy director of the CAA, told BBC News it has chartered “more than 40” aircraft, which are already in position, to bring passengers home.

He urged customers in the UK who were due to travel not to go to the airport “because very sadly your flight has been cancelled”.

Mr Johnson added: “For those who have not yet started their holiday, we will be publishing details of how they can claim a refund on the website, no later than next Monday.”

Business Secretary Andrea Leadsom has said she will write to the Insolvency Service urging them to “fast-track” their investigation into the circumstances surrounding Thomas Cook going into liquidation.

The DfT said the investigation will also consider the conduct of the directors.

Speaking to BBC News from Manchester airport, travel expert Simon Calder said Thomas Cook “wasn’t ready for the 21st Century”.

He said: “It was using a model that was great for the second half of the 20th Century where people would obediently go into their local travel agency and book a package holiday.

“Now everybody can pretend they are a travel agent. They’ve got access to all the airline seats, hotel beds, car rentals in the world and they can put things together themselves.

“Thomas Cook simply wasn’t differentiating enough.”

Mr Calder, travel editor at The Independent, added that planes at the airport began to be impounded shortly after 00:00 BST.