Tehran: A plane crash in Tehran that left 39 people dead last month was caused by engine failure and overloading, local media quoted Iranian authorities as saying on Monday.

The An-140 turboprop headed for the eastern city of Tabas crashed moments after takeoff from Tehran on August 10, triggering a fireball when it smashed into the capital’s Azadi neighbourhood.

Many more deaths were narrowly avoided as the plane came down only a few hundred metres from a busy market.

The head of the probe into the crash, Mohammad Shahbazi, was quoted in daily Khorasan as saying the plane’s right engine failed two seconds after takeoff.

The failure was not detected right away because of a faulty cockpit signal and the pilot was unable to react quickly enough, he said.

The investigation found that the plane was also overloaded given the hot temperatures of the day and the altitude of Tehran — both factors that can affect the performance of an airplane, including its rate of climb.

“Initial information indicates that the pilot tried to keep the plane horizontal but the aircraft fell from a height of 45 metres,” the newspaper quoted the head of Iran’s Civil Aviation Organisation, Alireza Jahangirian, as saying.

President Hassan Rouhani ordered the grounding of all domestically produced An-140s following the accident.

Iran has suffered several air crashes in recent years, blamed on ageing planes, poor maintenance and a shortage of new parts because of international sanctions.