It really depends on the country you are standing in middle (Transit terminal of Country B) of your A to C destination and name of country your travel document issued from. The more influential country any person belong to the batter option will have at time of resolving ‘stacked on transit issue’.
Visa/Transit/Travel document is not mainly introduced to ‘prevent’ someone to entering other country but to provide accountable service with proper security for citizen of both country in mind.
It is very common to get temporary permit to enter Dubai for person holding UK/USA passport traveling towards some destination on India in case of abnormal condition but on same flight Indian passport holder might have hard time convening authority for getting same permission. There might have few hundred lines if not thousand written on book of law, in reality person holding more influential country get batter service in middle of any inter-country journey. This is common scenario when dealing with authority outside of country. Holding less prominent country issued document normally expected to suffer by default.
An old story: 1991.
My wife, who at the time only had a Filipino passport, and I flew on Olympic from London to Bangkok via Athens. We had considered deliberately spending a few days in Athens but getting her a visa in London was too slow (they would have sent the application to Manila). So, we dropped the idea and booked a direct connection.
On arrival in Athens, we were told that the flight to Bangkok was overbooked. Volunteers were offered three days in Athens at the airline’s expense. I volunteered but mentioned my wife’s nationality. They said that they would sort it out and they did so very quickly. Her passport was held at the airport and she was given a temporary permit.
We asked about our baggage and were shown to a huge storage area and told: find your bags. We could not in the few minutes allowed so we had to make do with our hand luggage.
It worked out nicely: the side trip that we wanted and at the airline’s expense. Better still, the next day was Sunday and the Parthenon had free entry.
Oh, and I sent a fax to the office saying: sorry we could make our connection in Athens.
This happened to us once at Munich airport. We were a group of fifty corporate members who were travelling from Delhi to SFO via Munich. But our flight got delayed at Delhi itself, and while the connecting caught might have been delayed twenty minutes to accommodate out group, Lufthansa simply chose to ignore this knowing the next flight out to SFO was not until 24 hrs later. We were stuck at the airport. Without visa and could not go out. They provided temporary bedding at a terminal gate for fifty of us. The Munich airport shuts down at night, and they even switched off the heater, so we had to sleep in cold while it was snowing outside. There was nobody at the airport except few of us who we could have reported this to. We took the next flight out to SFO the next day.
So to answer your question, nobody can just exit into a country whatever the case may be. The evacuation too would happen towards inside of the airport than out to the city. If you want to know exactly what happens in such a case, I would recommend you watch Tom Hanks going through this scenario in the movie ‘The Terminal’.
Something similar once happened to me. I was transiting Beijing and didn’t have a valid Chinese visa (for reference, I’m a US citizen). I had an overnight layover and discovered upon my arrival in Beijing that the transit area was closed for the night. I had planned to sleep in the terminal to avoid the expense of buying a visa. I approached an immigration officer, explained my situation, and asked what I should do. He immediately stamped a one-day visa into my passport and admitted me into China.
As it happened, it snowed that night and my flight out the next morning was delayed. It was scheduled to depart at about 8:30 am, and they let us board at about 10. We then spent the rest of the day on the tarmac, supposedly waiting for de-icing. As tempers flared, they eventually canceled the flight at midnight. Upon disembarking, I again had no valid visa for China (my one-day visa having expired, and myself having checked out of the country anyway). But, they ran all the passengers through immigration the wrong way, and the officials didn’t even examine anyone’s passports. So, I ended up with an additional day in China until boarding the flight they re-booked me on.
All in all, while this trip had many hassles, immigration issues weren’t among them. Chinese immigration never gave me any problems.
Obviously this is going to differ by country and even by airport.
In the UK, the airport buildings are evacuated onto the runway or taxiway. This a controlled airside area and no one is permitted to leave until the emergency is dealt with. For instance, this happened at London City recently (this airport doesn’t actually handle more than a handful of transit passengers, but those who had just landed would not have had their passports examined yet).
Special provisions can be made, for instance, entry be granted on a special case basis (this what the UK usually does), the passengers might be escorted by police to a special transit hotel and kept under guard for the night (Russia does this), or the passengers might have to stay in the airport or in some special part of the airport that is especially kept open. This is part of the reason why some passengers require a visa just transit an airport.
Credit:stackoverflow.com‘