A passenger plane has crashed in the vicinity of Iran's Mehrabad Airport, located in Tehran. Thirty-nine out of the 48 passengers and crew on board died in the tragedy.

The Iran-140 Sepahan Air jetliner had barely left the airport, crashing shortly after takeoff on the outskirts of the capital at 09:45 (05:15 GMT) on Sunday, according to Iran’s semi-official Fars news agency.

Info of crashed jet in #Tehran: flight number: 5915 departure: Tehran destination: Tabas. Time: 9:15 am Airplane: Iran 140, Sepahan Air — Abas Aslani (@abasinfo) August 10, 2014

The first reports suggested that everyone on the plane was killed, but state media later reported that some passengers had survived and were taken to hospital with injuries.



According to state television, 37 people died instantly, two passed away on the way to hospital, and nine others are undergoing medical treatment.



The Civil Aviation Authority told IRNA news agency that there were two infants and three children under the age of 12 among the Iran-140 passengers.

After regaining consciousness, one of the survivors of the crash shared the story of his rescue with local IRINN television.



“The force of the blast threw us out of the plane," Mohammad Abedzadeh said, adding through tears that “seconds later, I saw the entire plane in flames.”



The crashed plane reportedly belonged to the Defense Ministry but was being used by Sepahan Air, according to the General Director of World & FP at Tasnim News Agency, Abas Aslani.

48 ppl were flying w crashed jet: - 34 adults - 3 infants under 2 - 3 under 12 - 2 pilots - 2 Stewardess - 2 tech. group - 2 flight security — Abas Aslani (@abasinfo) August 10, 2014

A technical glitch occurred four minutes before the crash, state television reported. Despite the pilots' efforts, they were unable to return to the airport.



An onboard computer issued an error command that resulted in one of the engines turning off abruptly, Aslani wrote on Twitter.



The site of the crash is reportedly only 500 meters away from a local market, Aslani said. If it hadn’t missed the densely populated area, the death toll could have been much higher.

“We should be thankful to God that the pilot did all he could to steer the plane away from residential buildings and fortunately did not crash into them. Otherwise, we would have been dealing with a much worse crisis,” said Jalal Maleki, a spokesman for Tehran’s Fire Department, as quoted by AP.



The plane was bound for Tabas in eastern Iran when it crashed just 5 kilometers (3.1 miles) west of the capital.



The Revolutionary Guard was working at the site, frantically pulling out survivors and combing the wreckage.

What is happening with all these crashes?! :/ RT “@SadraMohaqeq: plane crashed in Tehran. All 50 passengers died. pic.twitter.com/l3RUmUE5nU” — Fifi Haroon (@fifiharoon) August 10, 2014

According to state TV reports, some of the bodies were burnt beyond recognition and will therefore require DNA testing before they can be returned to their relatives.



The plane's entire tail section was mangled and torn from the fuselage.



The plane’s flight recorders have already been recovered, with Iranian President Hassan Rouhani ordering a halt to all Iran-140 flights pending a full investigation, IRNA reported.



Mehrabad is Tehran’s main domestic hub. Although it operates a small number of international flights, its domestic traffic alone makes it the busiest airport in the country. Most international destinations are served by Tehran Imam Khomeini International Airport.

The incident is the latest in a series of Iranian airplane catastrophes – the majority of them due to outdated equipment and poor maintenance.



Some politicians have blamed Iran’s record of commercial flying disasters on international sanctions, and measures that have restricted the Islamic Republic from purchasing new aircraft.



Any new parts are generally bought on the black market or pulled straight from other planes. Some parts are reproduced locally, according to Iranian aviation sources, Reuters reported.