Updated

A Ukrainian airplane carrying 176 passengers and crew crashed shortly after taking off from Tehran's airport Wednesday morning, killing all on board and turning farmland on the outskirts of the capital into fields of flaming debris.

The Ukraine International Airlines flight, bound for the country's capital of Kiev, plunged from the sky just minutes after departing Imam Khomeini International Airport, according to Iran's state-run IRNA news agency. The crash came hours after Iran launched a barrage of ballistic missiles on Iraqi bases housing American and coalition soldiers. Iranian officials said they suspect a mechanical issue brought down the Boeing 737-800 aircraft. Ukrainian officials initially agreed, but later backed away and declined to offer a cause while the investigation is ongoing.

"I heard a massive explosion and all the houses started to shake. There was fire everywhere," Din Mohammad Qassemi, an Iranian who lives near the crash site, told the Associated Press. Qassemi said he had been watching news broadcasts about the Iranian missile attack in revenge for the killing of Revolutionary Guard Gen. Qassem Soleimani when he heard the plane hit the ground outside his home.

Rescue workers search the scene where an Ukrainian plane crashed in Shahedshahr, southwest of the Iranian capital of Tehran, on Wednesday. (AP)

"At first I thought (the Americans) have hit here with missiles and went in the basement as a shelter," Qassemi added. "After a while, I went out and saw a plane has crashed over there. Body parts were lying around everywhere."

IRAN LAUNCHES 15 BALLISTIC MISSILES INTO IRAQ TARGETING US, COALITION FORCES, OFFICIALS SAY

All 167 passengers and nine crew members from different nations on board the plane perished, both Iranian and Ukrainian officials said. The nationalities of those dead, according to Ukraine Foreign Minister Vadym Prystaiko, were as follows: 82 Iranians, 63 Canadians, and 11 Ukrainians -- nine of which were crew members -- 10 Swedes, four Afghan, three German and three British.

Qassem Biniaz, a spokesman for Iran's Road and Transportation Ministry, said one of the plane's engines caught fire, causing the pilot to lose control of the aircraft. It also appeared the pilot couldn't communicate with air-traffic controllers in Tehran in the last moments of the flight, added Hassan Razaeifar, the head of Iran's air crash investigation committee.

Ukrainian President Volodymyr Zelensky's office offered his “sincere condolences to family and loved ones of all passengers and crew members.” He also cut his visit to Oman short and was returning to Kiev after the incident.

Rescue workers recover the bodies of victims at the crash site. (AP)

"We're preparing a group of specialists in order to help with the search operation and the investigation of the cause of the crash," added Ukrainian Prime Minister Oleksiy Honcharuk.

IRAN HIT WITH MAGNITUDE 4.9 EARTHQUAKE NEAR NUCLEAR PLANT

The plane had been delayed from taking off from Imam Khomeini International Airport by almost an hour. It took off to the west, but never made it above 8,000 feet in the air, according to data from the flight-tracking website FlightRadar24.

Staff at the Boryspil airport in Kiev, where the plane was headed, told the Associated Press that passengers on this flight are usually Iranian students coming back to Ukraine after winter holidays.

The Iranian Student News Agency (ISNA) shared a video online that claimed to show the plane catch fire as it descended. The video has not been independently confirmed.

Pir Hossein Kulivand, an Iranian emergency official, told state TV that rescuers are now trying to collect the dead.

IRAN'S SUPREME LEADER CALLS MISSILE STRIKE AT BASES 'A SLAP IN THE FACE'

Associated Press journalists who reached the crash site saw a wide field of debris scattered across farmland, the dead lying among shattered pieces of the aircraft. Their possessions, a child's cartoon-covered electric toothbrush, a stuffed animal, luggage and electronics, stretched everywhere. Rescuers in masks shouted over the noise of hovering helicopters as they worked.

“The only thing that the pilot managed to do was steer the plane towards a soccer field near here instead of a residential area back there,” witness Aref Geravand said. "It crashed near the field and in a water canal.”

Ukraine International Airlines announced it has indefinitely suspended flights to Tehran following the crash.

"It was one of the best planes we had, with an amazing, reliable crew," Yevhen Dykhne, president of the Ukraine International Airlines, said at a briefing.

The crash happened shortly after the plane departed Tehran's airport Wednesday morning. (AP)

In a statement to Fox News, Boeing said: "We are aware of the media reports out of Iran and we are gathering more information.”

IRANIAN OFFICIAL TWEETS PHOTO OF COUNTRY'S FLAG AFTER ATTACK ON U.S. TROOPS

The Boeing 737-800 is a very common single-aisle, twin-engine jetliner used for short to medium-range flights. Thousands of these planes are used by airlines around the world.

Introduced in the late 1990s, it is an older model than the Boeing 737 MAX, which has been grounded for nearly 10 months following two deadly crashes. Boeing built the aircraft that crashed Wednesday in 2016 and it last underwent routine maintenance on Monday, Ukraine International Airlines said.

All 176 passengers and crew on board the plane died in the crash, officials said. (AP)

A number of 737-800 aircraft have been involved in deadly accidents over the years.

In March 2016, a FlyDubai 737-800 from Dubai crashed while trying to land at Rostov-on-Don airport in Russia, killing 62 on board. 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.

Hours before the plane went down Wednesday, Iran fired as many as 15 ballistic missiles into Iraq, officials said, in a major retaliation by the rogue regime after the U.S. airstrike that killed Soleimani last week.

CLICK HERE TO GET THE FOX NEWS APP

Ten missiles hit Ain al-Asad Air Base, one missile hit a military base in Erbil and four missiles failed to hit their targets, according to a U.S. military spokesman for Central Command, responsible for American forces in the Middle East. The attacks unfolded in two waves, each about an hour apart.

Initial assessments showed "no U.S. casualties," a U.S. military official in Baghdad told Fox News.

Fox News' Greg Norman and the Associated Press contributed to this report.