It’s, to most people, the worst-case travel scenario that doesn’t involve a plane full of wild, man-eating hyenas. You’re on vacation in some far-off land, thanks mostly to a super-cheap fare you found on a discount foreign airline, and while you’re busy soaking up the local culture, your airline goes bankrupt.

You have no backup plan. You’ve emptied out your bank account spending on vacation fun. And the only way home is a last-minute ticket on a major airline, which costs more than your mortgage payment.

“Surely someone has to pay for this!” you scream at no one in particular while staring at an airport departures screen, with “Cancelled” written 14 times in a row.

Sadly, you’re wrong.

“If an airline goes bankrupt, the situation is not very good for the passenger,” says Chrystel Erotokritou, the legal advisor for AirHelp. “There’s a priority for [who the airline has to pay] — employees, then the state administration, then all the partners like catering and fuel suppliers. Unfortunately the passengers come at the end.”

Effectively, if you’re trying to get your money back from the now-defunct airline, get in line.

A belly-up company won’t have much money to give, that is, if you can even get a hold of anyone. Typically when an airline goes bankrupt all its employees get laid off too, so that customer service line you plan to call won’t pick up. And the ticket counter will be closed.

Since the airline won’t be of any help, what is one to do now? Well, you have a few options.

The first thing you must do, obviously, is to find a way home. In some cases, Erotokritou says, competing airlines have offered deeply discounted fares to stranded passengers. This past September when French carriers Aigle Azur and XL Airways both went belly up, Air France stepped in and offered cheap flights home to passengers stuck in Algeria and Mali.

But this is never a guarantee and is based on availability. If bankruptcy hits during a busy time, it likely won’t be an option.

When Thomas Cook declared bankruptcy later in the month, the Civil Aviation Authority — the UK’s version of the FAA — stepped in and literally chartered flights to get many of the estimated 150,000 stranded Brittons repatriated. It was dubbed the largest peacetime repatriation mission in history. But it also cost the government about 600 million euros.

Odds are, the USA won’t be quite as generous.

“The best thing (passengers) can do is buy a new ticket to fly to where they were supposed to fly, then contact banks, contact insurance, and they can come to AirHelp for us to try to take action against the airline,” Erotokritou says. “But in this kind of situation you can never expect miracles. Bankruptcy means there is no more money. So it is always a difficult situation.”

Even if you had to max out your credit cards to get home, you may still have recourse to get that money back. Travel insurance is your best bet, and though most people don’t purchase it, Erotokritou says if you’re traveling with a discount airline it’s the best way to ensure this nightmare scenario doesn’t happen to you.

If you paid with a credit card, you can also ask for the charge to be blocked, or for a refund on the purchase since the merchant did not live up to delivery of its goods or services. That little tidbit is actually written on most credit card agreements. Some cards, like Chase Sapphire, also offer coverage for new tickets home, so look into that when shopping for travel credit cards.

Again, Erotokritou stresses getting to your destination should be your first step before pursuing any claims. This may involve fronting some money until everything is back to normal, but in the wake of a bankruptcy you won’t be getting much out of the airline anyway.

So while your options aren’t great when your vacation ends with an airline going bust, all is not lost. Travel insurance and credit cards may well have your back, if other airlines and the government do not. An ideal situation it is not. But still probably better than a plane full of hyenas.