Airlines are coming under increasing scrutiny for continuing to fly in Iran after a missile barrage and warnings by U.S. safety regulators about the dangerous conditions.

American, British and Canadian officials said Thursday it is "highly likely" that Iran shot down a Ukrainian airliner near Tehran this week, possibly by accident, during a time of high political tension in the region.

About 2 1/2 hours before the Ukraine International Airlines jet with 176 people on board took off, the Federal Aviation Administration issued emergency orders prohibiting American pilots and airlines from flying over Iran, the Persian Gulf or the Gulf of Oman.

The notices warned that heightened military activity and political tension in the Middle East posed "an inadvertent risk" to U.S. aircraft "due to the potential for miscalculation or mis-identification."

Foreign airlines aren't bound by FAA directives, but they often follow them. In this case, however, several large international carriers -- including Lufthansa, Turkish Airlines, Qatar Airways and Aeroflot -- continued to fly in and out of Tehran after Iran fired missiles at military bases inside Iraq that house U.S. troops. They still were flying after the FAA warning, and after the Ukrainian jetliner crashed, according to data from Flightradar24, which tracks flights around the world.

"It was awfully peculiar and awfully risky," said Peter Goelz, a former managing director of the U.S. National Transportation Safety Board. "That's a theatre of war and these guys were acting like there was nothing going on."

Goelz said airlines should have cancelled all flights when Iran fired the missiles. Those attacks occurred the night before the Ukrainian plane was scheduled to leave Tehran.

After the FAA notices, 12 airliners took off or landed without incident early Wednesday at Tehran's Imam Khomeini International Airport, according to data from Flightradar24. Ukraine International Airlines flight 752 was No. 13.

By late Thursday, some major airlines had changed their thinking. A Lufthansa flight from Frankfurt to Tehran turned back over Romania and headed back toward Germany. Austrian Airlines said on Twitter that "due to the latest reports and the changed assessment of the security situation for the airspace around Tehran airport," it cancelled a flight Thursday and another Friday. Turkish Airlines temporarily halted flights to Iran and Iraq.

Some safety experts defended the airlines and said that if turns out the Ukrainian plane was shot down, even by accident, the blame rests entirely with Iran. Under international agreements, countries are obligated to monitor their own airspace and tell operators about changes in safety conditions. The governments are expected to know more than airlines, especially those from other countries, as was the case in the loss of the Ukraine International Airlines plane.

"I don't think you can fault the airline," said John Cox, a former airline pilot and now a safety consultant. "Iran could have shut their airspace down if they believed there was a threat."

Airliners rarely get hit by missiles, although the threat has existed for many years. Aviation-security experts worry about portable, shoulder-carried weapons that could be used against planes as they take off or land -- when they are closest to the ground.

It takes more sophisticated weapons to threaten jets at cruising altitude. That, however, is exactly what happened to Malaysia Airlines flight 17, which was brought down by a Russian-made Buk missile in July 2014 as it flew about 33,000 feet over Ukraine, on the way from Amsterdam to Kuala Lumpur. All 298 people on board died.

In that incident and the 1988 downing of an Iranian airliner by a missile fired from the U.S. Navy cruiser USS Vincennes --- killing all 290 people on the plane -- it appeared that combatants fired their weapons before they were certain whether the target was a military plane or a civilian one, Cox said.

This week's crash in Iran "is a needless tragedy, but it doesn't change my view of the safety of aviation," Cox said.

Goelz said, however, that airlines need to be more stringent in tracking combat zones and avoiding them.

In 2014, aviation authorities issued warnings about Ukrainian airspace, telling airlines to fly above a certain altitude because of the fighting involving pro-Russia rebels armed with Russian-made surface-to-air missiles, who had already shot down government military planes.

Some airlines opted to fly around Ukraine completely, even though that meant longer flights and more fuel burn. Malaysia Airlines opted to keep flying over Ukraine, just at a higher altitude. The result was catastrophic.

"If you told passengers, `It's going to take a couple more hours to get where you want to go, or we can get you there quicker but you might get shot down,' I think they would say, `We'll take the extra hours,"' Goelz said.