Iran officials acknowledged Saturday that they accidentally shot down a Ukrainian passenger plane that crashed earlier this week, killing all 176 people aboard.

Gen. Amir Ali Hajizadeh, head of the aerospace division of Iran’s Revolutionary Guard, told state TV that his unit accepts “full responsibility” for shooting down the aircraft minutes after it took off Wednesday from Tehran’s international airport. He said that when he learned about the downing of the plane, “I wished I was dead.”

UKRAINIAN AIRPLANE SHOT DOWN BY MISTAKE BY IRAN JOINS LIST OF AIR DISASTERS DURING CONFLICT

The aircraft, which was heading to Kiev, was shot down hours after Iran launched a ballistic missile attack on two military bases housing U.S. and coalition troops in Iraq. Those attacks were in retaliation for the killing of Iranian Gen. Qassem Soleimani in an American airstrike in Baghdad.

No one was wounded in the attack on the bases.

IRAN DEMANDS WEST 'SHOW FINDINGS' AS NEW VIDEO REVEALS AIRCRAFT WAS STRUCK BEFORE FIERY CRASH

Days later, U.S. military officials said they believed Iran had mistakenly shot down the plane using a surface-to-air missile. This conclusion was supported by videos that purportedly show a fast-moving light through the trees before a high fireball illuminates the landscape.

Someone off-camera says in Farsi: “The plane has caught fire. ... In the name of God, the compassionate, the merciful. God, help us. Call the fire department!”

Hajizadeh told Iranian state media that Tehran had beefed up its air defenses and was at the “highest level of readiness,” fearing any U.S. retaliation to the missile attacks on its troops.

He said the pilot and crew of the passenger plane had done nothing wrong and that the armed forces alone were responsible. An officer made the “bad decision” to open fire on the plane after mistaking it for a cruise missile, he added.

US-IRAN TENSIONS: A TIMELINE OF INCIDENTS BETWEEN TWO LONGTIME RIVALS

“A sad day,” Iran’s Foreign Minister Mohammad Javad Zarif tweeted. “Human error at time of crisis caused by US adventurism led to disaster. Our profound regrets, apologies and condolences to our people, to the families of all victims, and to other affected nations.”

SOUTHERN CALIFORNIA DOCTORAL STUDENT, MOTHER AND SISTER AMONG 176 KILLED IN IRAN PLANE CRASH

Iran's President Hassan Rouhani also tweeted about "human error" causing the "horrific crash," calling it a "great tragedy & unforgivable mistake."

He also wrote, "The Islamic Republic of Iran deeply regrets this disastrous mistake," but made no mention of the U.S. in either message.

Iran's supreme leader, Ayatollah Ali Khamenei, expressed his “deep sympathy” to the families of the victims and called on the armed forces to "pursue probable shortcomings and guilt in the painful incident.”

Ukraine's President Volodymyr Zelenskiy issued a statement saying the crash investigation should continue and the “perpetrators” should be brought to justice. He said Iran should compensate victims' families, and he requested “official apologies through diplomatic channels.”

The plane, which was bound for Kiev, the Ukrainian capital, had 167 passengers and nine crew members aboard. Those killed included 82 Iranians, 57 Canadians and 11 Ukrainians, officials said.

Among the dead were a California doctoral student, who was an Iranian immigrant to Canada, as well as her sister and mother, who were residents of Edmonton, Alberta in Canada, reports said.

On Friday, Canada's foreign minister had announced the launch of an international effort to press Iran for a thorough investigation into the cause of the crash.

Iran's acknowledgment of responsibility was likely to renew questions of why authorities did not shut down the country's main international airport and its airspace after the ballistic missile attack when they feared U.S. reprisals.

CLICK HERE TO GET THE FOX NEWS APP

It also undermines the credibility of information provided by senior Iranian officials. As recently as Friday, Ali Abedzadeh, the head of the national aviation department, had told reporters “with certainty” that a missile had not caused the crash.

The United States has promised it would take "appropriate action" following its determination that the aircraft was downed by an Iranian missile.

The Associated Press contributed to this story.

The Associated Press contributed to this story.