>> Iran launches over a dozen ballistic missiles at U.S. bases in Iraq

A Ukrainian airliner burst into flames shortly after take-off from Tehran on Wednesday, killing all 176 people aboard in a crash that an initial Iranian report blamed on engine failure.

Debris and smoldering engine parts were strewn across a field around 10 km (six miles) from Imam Khomeini airport as rescue workers with face masks retrieved bodies of the victims.

The crash came hours after Iran launched a ballistic missile attack targeting two bases in Iraq housing U.S. forces in retaliation for the killing of Revolutionary Guard Gen. Qassem Soleimani.

Ukraine's embassy in Iran dropped an initial reference to engine failure as the cause of the plane crash. It later said in a second statement that the causes had not been disclosed and that any previous comments were not official.

Iranian authorities said they recovered the flight data recorders, commonly known as black boxes, according to U.S. network CNN quoting the head of Iran’s Civil Aviation Authority, Ali Abedzadeh.

Open gallery view Passengers' dead bodies in plastic bags at the site where the Ukraine International Airlines plane crashed, on the outskirts of Tehran, Iran January 8, 2020. Credit: WANA NEWS AGENCY/ REUTERS

"We will not give the black box to the manufacturer [Boeing] or America,” Abedzadeh told the Mehr news agency, in accordance with international rules, CNN reported. No pronouncement would be made regarding the cause of the crash, the official added, until the black boxes were analyzed.

Under international rules, Ukraine would be party to the investigation, and the United States would usually be accredited as the country where the jet was designed and built. France, where engine maker CFM has half its activities, may also be involved.

There was no immediate word on whether the U.S. National Transportation Safety Board would be involved. The NTSB usually invites Boeing to give technical advice in such investigations.

Asked at a briefing in Kiev if the plane could have been downed by a missile, Ukraine's Prime Minister Oleksiy Honcharuk cautioned against speculation until the results of an investigation were known. He also said that Ukraine had banned flights through Iranian airspace by its airliners from January 9.

Carrier Ukraine International Airlines said it was doing everything possible to confirm the cause, and the investigation would also involve Boeing and Ukrainian and Iranian authorities. It was the Kiev-based airline's first fatal accident.

Ukraine President Volodymyr Zelenskiy said all on board had died. "My sincere condolences to the relatives and friends of all passengers and crew," he said in a statement.

"The fire is so heavy that we cannot do any rescue ... we have 22 ambulances, four bus ambulances and a helicopter at the site," Pirhossein Koulivand, head of Iran's emergency services, told Iranian state television.

Ukraine's prime minister and Iranian state TV said 167 passengers and nine crew were on board. Iranian TV said 32 of those on board were foreigners.

Ukrainian Foreign Minister Vadym Prystaiko said the victims included 82 from Iran, 63 Canadians, 11 Ukrainians, 10 Swedes, three Germans and three Britons. Most passengers were in transit, the airline said.

Open gallery view A Boeing 737-800 of the Ukraine International airline is seen at the airport in Duesseldorf, western Germany, September 24, 2019. Credit: AFP

Iran's ISNA news agency later said two of the Canadian dead were Pedram Mousavi and Mojgan Daneshmand, both professors at the University of Alberta, according to the university's website.

ISNA named two other victims as students Marzieh Foroutan and Delaram Dadashnejad. According to a 2016 census, around 210,000 of Canada's 38 million inhabitants are of Iranian descent.

Canada broke off diplomatic relations with Iran in 2012. There are no direct flights between Canada and Iran, which means passengers need to use connecting flights.The route from Canada to Iran via Kiev had become popular with Iranian-Canadians in recent years.

Iranian media quoted a local aviation official as saying the pilot did not declare an emergency.

Iranian TV said the crash was due to unspecified technical problems. State broadcaster IRIB said on its website that one of the plane's two black boxes - the flight data recorder and the cockpit voice recorder - had been found.

Flight data from the airport showed the Ukrainian 737-800 flown by Ukraine International Airlines took off Wednesday morning, then stopped sending data almost immediately afterward, according to website FlightRadar24. The airline did not immediately respond to a request for comment.

Open gallery view Rescue teams work amidst debris after a Ukrainian plane crashed near Imam Khomeini airport in the Iranian capital Tehran early in the morning on January 8, 2020. Credit: AFP

Good safety record

The plane that crashed was a three-year-old Boeing 737-800NG en route to Kiev, air tracking service FlightRadar24 said.

"The last scheduled maintenance of the aircraft took place on 06 January, 2020," the airline said.

A spokesman for the manufacturer said it was gathering more information.

The 737-800 is one of the world's most-flown models with a good safety record and does not have the software feature implicated in crashes of the 737 MAX. Boeing grounded its 737 MAX fleet in March after two crashes that killed 346 people.

The 737-800's twin engines are made by CFM International, a U.S.-French venture co-owned by General Electric and France's Safran.

Modern aircraft are designed and certified to cope with an engine failure shortly after take-off and to fly for extended periods on one engine. However, an uncontained engine failure releasing shrapnel can cause damage to other aircraft systems.

Under international rules overseen by the United Nations, Iran is responsible for leading the crash investigation.

Ukraine would be involved and the United States would usually be accredited as the country where the jet was designed and built. France, where the engine maker CFM has half its activities, may also be involved.

With relations between Washington and Tehran mired in crisis , there was no immediate word on whether the U.S. National Transportation Safety Board would be involved in the investigation.

The NTSB usually invites Boeing to give technical advice in such investigations.

In March 2016, a FlyDubai 737-800 from Dubai crashed while trying to land at Rostov-on-Don airport in Russia, killing 62 onboard. Another 737-800 flight from Dubai, operated by Air India Express, crashed in May 2010 while trying to land in Mangalore, India, killing more than 150 onboard.

The Associated Press contributed to this report.