There’s a very attractive loophole for Americans who want to fly to a foreign country—take a foreign airline that has nothing to do with that country.

Why is this a loophole? Normally, airlines from a given country are, by international treaty, not allowed to fly passengers directly between two other countries. But the terms of that 1944 aviation treaty also say that if a flight stops along the way, new passengers can start or end their own journeys at that ­interim stop.

Example: Dubai-based Emirates airline flies between Newark, New Jersey, and Dubai, but those flights make interim stops in Athens, and the Newark-Athens leg was recently offered for $634 round-trip.

In the airline industry, these are called “fifth-freedom flights” because they’re based on the fifth item in the treaty, and airlines increasingly are taking advantage of this loophole to fly popular or underserved routes. For US passengers, this can be a way to fly on an airline that’s known for elite comfort and service including Emirates and others such as Cathay Pacific, Korean Air and Singapore Airlines.

Thanks to airline alliances, it also can be a way to earn or use frequent-flier miles in a US-based program you use. Emirates miles, for example, can be used on JetBlue. Fifth-freedom flights often are less expensive than competing nonstop flights as well.

On the downside, most fifth-freedom flights occur only once a day, so if your flight is canceled or you’re bumped, the airline might struggle to quickly get you on a different flight to your destination.

Other appealing fifth-freedom routes: Los Angeles–London on Air New Zealand…LA–Dublin on Ethiopian Airlines…LA–Sao Paulo on Korean Air…LA–Paris on Air Tahiti Nui…Houston–Manchester, England, on Singapore Airlines…JFK–Milan on Emirates…JFK–Frankfurt on Singapore Airlines…JFK–Vancouver on Cathay Pacific.