A number of commercial airlines have rerouted flights to avoid possible danger amid escalating tensions between the United States and Iran.

The UK has urged Iran not to carry out further “reckless and dangerous” attacks after Tehran fired missiles at military bases in Iraq hosting British and US troops.

British Airways rerouted flight 134 from Mumbai to Heathrow mid-way through the flight, to avoid crossing Iraqi airspace. The plane flew in a circle and was then diverted to the Greek capital Athens for refuelling.

READ MORE: Trump knows Iran weakness will hamper re-election odds

The move has left a number of Indian passport holders stuck in the terminal as they do not possess the right visa to leave the airport.

One passenger, who asked not to be named, told the PA news agency that Indian nationals had been stuck in the terminal for a number of hours.

He said: “Since we don’t have Schengen visa, BA couldn’t put us in hotels which are outside the airport. Athens staff are doing their best to find alternate BA flights for us but looks like 20 odd passengers couldn’t be accommodated.

“So either we will be put on other flights or else have to spend the night at the terminal lounge.”

He said the flight, which took off more than 15 hours ago, had been rescheduled to Thursday morning.

British Airways said: “We appreciate the frustrating situation that a handful of our customers are in, without visas to enter Greece, following the diversion.

“We have apologised to our customers for the delay to their travel plans and our colleagues are doing everything they can to rebook customers, and take care of them until their flight departs.”

Virgin Atlantic said it is “closely monitoring the situation” and its aircraft are not flying over Iranian airspace. Due to changes in flight routing, trips to and from Mumbai may take longer than expected.

Australian carrier Qantas said it is altering its route from London to Perth, Australia, to avoid Iranian and Iraqi airspace until further notice.

Malaysia Airlines and Singapore Airlines have also rerouted planes to avoid Iranian airspace.

The US Federal Aviation Administration has barred American pilots and carriers from flying in areas of Iraqi, Iranian and some Persian Gulf airspace while the Russian aviation agency has recommended all Russian airlines avoid flying over Iran, Iraq, the Persian Gulf and the Gulf of Oman.

READ MORE: Iran launches missiles at US bases in Iraq

Foreign Secretary Dominic Raab has urged Iran to pursue “urgent de-escalation” as the crisis in the Gulf intensifies.

US President Donald Trump tweeted “all is well” following the attack on the bases, which was carried out in response to the killing of Iranian General Qassem Soleimani by America.

US officials said 15 missiles were fired, with 10 striking the Ain al-Asad base 100 miles west of Baghdad, one striking a base in Irbil in northern Iraq’s semi-autonomous Kurdish region, and another four missing their targets.