Iran's aviation authority said it would not hand over to Americans the recovered black boxes of a Boeing 737 that crashed on Wednesday, killing all 176 passengers and crew.
"We will not give the black boxes to the manufacturer (Boeing) and the Americans," Iran Civil Aviation Organisation head Ali Abedzadeh said, quoted by Mehr news agency.
"It's not yet clear which country the black box will go to for the investigation," he added.
• Iran plane crash: 63 Canadians and three Britons among 176 dead after plane crashed near Tehran
• Ukraine passenger plane carrying 176 people crashes in Tehran, all aboard killed
• US President Donald Trump addresses the nation amid showdown with Iran
• Iran vows 'harsh' response after US airstrike kills top general Qassem Soleimani
Following the crash of Ukraine International Airlines flight PS752 shortly after takeoff from Tehran on Wednesday, Iran said it had recovered the Boeing 737's two black boxes.
Abedzadeh said that based on global aviation rules, it was the right of the country where air crashes occur to carry out the investigation.
"This accident will be investigated by Iran's aviation organisation but the Ukrainians can also be present during the incident's investigation," he added.
Under the rules of the International Civil Aviation Organization, of which Iran, Ukraine and the United States are all members, air crash investigations are led by the country where the accident occurred.
However, according to aviation experts, the countries that are capable of analysing black boxes are few - notably Britain, France, Germany and the United States.
France's Accident Investigation Bureau (BEA), which handles air crash investigations, said it had not received any request for help from the Iranian authorities after Wednesday's crash.
The Ukrainian plane that crashed in Iran killing 176 people, went through maintenance checks just two days before the accident, which officials say was caused by a fire in one of its engines.
Ukraine's minister for foreign affairs Vadym Prystaiko confirmed the nationalities of those killed including 82 passengers from Iran and 63 Canadians. Two passengers and nine crew were from Ukraine, there were 10 from Sweden, 4 from Afghanistan, 4 from Germany, and 3 from the UK.
Canada is home to a large Iranian diaspora community and UIA offers discount flights between Tehran and Toronto, with a transit in Kiev.
UIA released a list of the names and birth years of passengers. At least 25 were under the age of 18. Iran's semi-official news agency ISNA said 13 of the passengers were students from Tehran's Sharif University, the most prestigious in the country.
Two passengers registered on the flight did not board before take-off, Oleksiy Danilov, the head of Ukraine's national security council, told reporters.
The airline said the Boeing 737 had been built in 2016 and checked only two days before the accident. It was Kiev-based UIA's first fatal crash.
"The plane was in working order," UIA company president Yevgeniy Dykhne told a briefing in Kiev where he choked back tears. "It was one of our best planes with a wonderful crew." Zelensky, who cut short a vacation in Oman to return to Kiev, ordered an investigation into the crash and a sweeping check of "all civilian aircraft" in the country.
"I ask everyone to keep from speculating and putting forth unconfirmed theories about the crash," Zelensky wrote on Facebook.
Iranian state media reported that the plane caught fire after crashing, but a video aired by the state broadcaster appeared to show the plane already on fire as it fell from the night sky.
The crash came hours after Iran launched a ballistic missile attack on Iraqi bases housing US soldiers, but both Ukrainian and Iranian officials said they suspected a mechanical issue brought down aircraft.
Two black boxes from the plane have been found, according to semi-official news agency ISNA.
Flight PS752 had been delayed from taking off by almost an hour from Tehran's Imam Khomeini International Airport.
It took off to the west, but never made it above 8000 feet in the air, according to data from the flight-tracking website FlightRadar24. It remains unclear what happened.
Qassem Biniaz, a spokesman for Iran's Road and Transportation Ministry, said it appeared a fire struck one of its engines.
The pilot of the aircraft then lost control of the plane, sending it crashing into the ground, Biniaz said, according to the state-run IRNA news agency.
Hassan Razaeifar, the head of air crash investigation committee, said it appeared the pilot couldn't communicate with air-traffic controllers in Tehran in the last moments of the flight. He did not elaborate.
Ukrainian President Volodymyr Zelensky ordered a sweeping inspection of all civil airplanes in the country, "no matter the conclusions about the crash in Iran."
Ukraine International Airlines said the plane was checked only two days before the accident.
"The plane was manufactured in 2016, it was received by the airline directly from the (Boeing) factory. The plane underwent its last planned technical maintenance on January 6, 2020," the airline said in a statement.
Ukrainian authorities have offered to help with the investigation of the plane crash.
"We're preparing a group of specialists in order to help with the search operation and the investigation of the cause of the crash," Ukrainian Prime Minister Oleksiy Honcharuk said.
There were 167 passengers and nine crew on board the Boeing 737 when it crashed and they were all killed.
The plane, fully loaded with fuel for its 2300-kilometre flight, slammed into farmland near the town of Shahedshahr on the outskirts of Tehran.
Videos taken immediately after the crash show blazes lighting up the darkened fields before dawn.
Resident Din Mohammad Qassemi said he had been watching the news about the Iranian ballistic missile attack on US forces in Iraq in revenge for the killing of Revolutionary Guard Gen. Qassem Soleimani when he heard the crash.
"I heard a massive explosion and all the houses started to shake. There was fire everywhere," he told the Associated Press.
"At first I thought (the Americans) have hit here with missiles and went in the basement as a shelter. After a while, I went out and saw a plane has crashed over there. Body parts were lying around everywhere."
The Ukraine International Airlines plane had taken off shortly after 6am (local time) and it went down in farmland outside of Iran's capital.
Staff at the Boryspil airport in Kiev, where the plane was headed, told The Associated Press that passengers on this flight were usually Iranian students coming back to Ukraine after winter holidays.
Associated Press journalists who reached the crash site saw a wide field of field of debris scattered across farmland. The dead lay among shattered pieces of the aircraft.
State media earlier reported that the crash was suspected to have been caused by mechanical issues, without elaborating.
Iran's Civil Aviation Authority later said: "The cause of the Ukraine International Airlines 737 crash is not clear yet".
BBC journalist Bahman Kalbasi posted video of the smouldering crash site, describing it as "gut wrenching". Another video shows large pieces of the plane and body bags at the scene.
The Iran Red Crescent Society, a non-governmental humanitarian organisation in Iran, posted photos of the crash site and said there was no chance anyone had survived the crash.
Aviation analyst Alex Macheras also noted that Iran's state media had blamed technical problems soon after the accident without any investigation.
An investigation team was at the site of the crash in southwestern outskirts of Tehran, civil aviation spokesman Reza Jafarzadeh said.
"After taking off from Imam Khomeini International Airport, it crashed between Parand and Shahriar," Jafarzadeh said.
"An investigation team from the national aviation department was dispatched to the location after the news was announced."
Ukraine's President Volodymyr Zelenskiy extended his condolences to the families of the victims.
His office said he had cut his visit to Oman short and was returning to Kiev because of the crash. The country's Prime Minister Oleksiy Honcharuk confirmed the casualty toll.
"Our task is to establish the cause of the crash of the Boeing and provide all necessary help to the families of the victims," said parliament speaker, Dmytro Razumkov, in a Facebook statement.
Flight data from the airport showed a 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.
Boeing has tweeted a statement saying: "We are aware of the media reports out of Iran and we are gathering more information".
Journalist Hakan Celik tweeted that the plane, which was a Boeing 737-800 serial 38124, was only 3.5 years old.
The crash came hours after Iran launched a ballistic missile attack targeting two bases in Iraq housing US forces in retaliation for the killing of Revolutionary Guard General Qassem Soleimani.
The US Federal Aviation Administration said Tuesday it was banning US-registered carriers from flying over Iraq, Iran and the Gulf following rocket attacks on US forces in Iraq.
"The (FAA) issues Notices to Airmen tonight outlining flight restrictions that prohibit US civil aviation operators from operating in the airspace over Iraq, Iran and the waters of the Persian Gulf and the Gulf of Oman," it said in a statement.
"The FAA will continue closely monitoring events in the Middle East."
The Boeing 737-800 is not to be confused with the 737 MAX, which has been grounded since March after two crashes in Indonesia and Ethiopia killed 346 people within five months.
It is a very common single-aisle, twin-engine jetliner used for short to medium-range flights. Thousands of the planes are used by airlines around the world.
Introduced in the late 1990s, it is an older model than the Boeing 737 MAX.