A Ukrainian airplane carrying around 170 passengers and crew crashed Wednesday near an airport in Iran's capital, killing everyone on board, state TV reported.

The plane had taken off from Imam Khomeini International Airport in Tehran, the report said. The crash is suspected to have been caused by mechanical problems, it added, without elaborating.

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."

Pir Hossein Kulivand, an Iranian emergency official, later told state TV all those on board were killed in the crash. He said rescuers were trying to collect the dead.

State TV earlier said there were 180 passengers and crew aboard. The discrepancy could not be immediately reconciled.

According to the website FlightRadar24, a Ukrainian 737-800 flown by Ukraine International Airlines took off Wednesday morning, then stopped sending data almost immediately afterward.

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.

Pir Hossein Kulivand, an Iranian emergency official, later told state TV all those on board were killed in the crash. He said rescuers were trying to collect the dead. (Mohammad Nasiri/The Associated Press)

The Boeing 737-800 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, which has been grounded for nearly 10 months following two deadly crashes.

Boeing did not immediately respond to a request for comment. Boeing, like other airline manufacturers, typically assists in crash investigations. However, that effort in this case could be affected by the U.S. sanctions against Iran since U.S. President Donald Trump unilaterally withdrew from Tehran's nuclear deal with world powers in May 2018.

In a tweet, Boeing said: "We are aware of the media reports out of Iran and we are gathering more information."