The Washington Post writes:
If not for a gesture of goodwill from Bahrain, whose airspace practically encircles Qatar, the airline would have to cease operations.
But is it really a gesture of good will?
Bahrain's territorial airspace (i.e. the area above Bahrain and its territorial waters) doesn't surround Qatar. Its FIR (flight information region), along with these of UAE and Saudi Arabia, does surround Qatar.
Saudi Arabia and the UAE can surely ban Qatar's planes from entering their territorial airspace. So can Bahrain - but can it prevent them from entering their FIR?
P.S. An example of entering another country's FIR uninvited - Jordan's FIR covers the west bank. Israeli flights (and military flights) routinely fly there, and did so even before the 1994 peace agreement.