If the Saudis are going to dump their alliance with Qatar, their main rival in the region is happy to fill the void.

The Iranians have taken the diplomatic high ground, advocating cooperation in the region — and offering food and airspace to the Qataris.

"The Islamic Republic of Iran," said Iranian Foreign Ministry spokesman Bahram Qassemi, "calls on all the neighbors involved in the current disputes in the southern Persian Gulf region to learn lessons from the past bitter experiences of the region… show utmost restraint and move toward reducing tensions and returning to tranquility."

Saudi Arabia, Egypt, Bahrain and the United Arab Emirates said Monday they were breaking off diplomatic relations with Qatar and severing air, sea and land links, accusing the tiny Gulf nation of backing terrorism and getting too cozy with Iran.

Related: Behind the Split Between Qatar And Its Neighbors

After Saudi Arabia shut its borders with Qatar, food started to disappear from the shelves of stores in Doha, the Qatari capital. Shoppers filled their carts, knowing how many consumer goods cross the Saudi border.

A top Iranian agricultural official responded by announcing Monday that Iran could send food shipments to Qatar by ship. He said the shipments would take 12 hours to reach Qatar. It is not known if any shipments have yet arrived.

People line up to buy food items at a supermarket in Doha, Qatar, on June 5, 2017. @shalome05 / via AP

Meanwhile, because Egypt, Saudi Arabia, and the other Gulf States have closed their airspaces to Qatari planes, Iran is allowing Qatari airlines to use Iranian airspace.

An Iranian transportation official said Tuesday that Qatari flights bound to North Africa and Europe that used to cross Saudi, Egyptian or Kuwaiti airspace can now travel over Iran, Iraq and Jordan. Flights to Northern Europe can cross Iran. The official said Iran's air traffic would increase 20 percent, as would its revenue from fees for use of its airspace.

Programs that track flight paths show that Qatari airplanes have changed their routes. Those headed to Europe are crossing the Persian Gulf into Iranian airspace and then heading north across Iran and Jordan.

Qatar flights now banned from Saudi, Bahraini, and Emirati airspace. Egyptian ban goes into effect 0400 UTC.



ℹ️ https://t.co/lXphkPY9UA pic.twitter.com/pqj7S9dmql — Flightradar24 (@flightradar24) June 6, 2017

The flights most affected are those to Africa, some of which must now cross south of Saudi Arabia. A flight from Doha to Khartoum now takes 2 hours and 20 minutes longer.