Iran announced Saturday that its military shot down a Ukrainian passenger jet earlier this week in the outskirts of Tehran, killing all 176 people aboard. It said it was unintentional.

The downing of the Ukraine International Airlines flight happened just hours after Iran launched a ballistic missile attack on Iraqi bases housing U.S. soldiers in response to last week’s U.S. drone attack that killed Iranian Quds Force commander Qassem Soleimani. No one was wounded in the attack on the bases.

Iran’s President Hassan Rouhani blamed the tragedy on “threats and bullying” by the United States after the killing of Soleimani. He expressed condolences to families of the victims, and he called for a “full investigation” and the prosecution of those responsible.

“A sad day,” Iran’s Foreign Minister Mohammad Javad Zarif posted Saturday on Twitter. “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.”

Military statement

State media carried the military statement. It said the Ukrainian plane was mistaken for a “hostile target” after it turned toward a “sensitive military center” of the Revolutionary Guard. The military was at its “highest level of readiness,” it said, amid the heightened tensions with the United States.

“In such a condition, because of human error and in a unintentional way, the flight was hit,” the statement said. It apologized for the disaster and said it would upgrade its systems to prevent future tragedies.

It also said those responsible for the strike on the plane would be prosecuted.

FILE – Photographs of students who were on a Ukrainian passenger jet that crashed in Iran are seen during a vigil at University of Toronto student housing in Toronto, Ontario, Canada, Jan. 8, 2020.

The plane, en route to the Ukrainian capital of Kyiv, was carrying 167 passengers and nine crew members from several countries, including 82 Iranians, at least 57 Canadians and 11 Ukrainians, according to officials. The Canadian government had earlier lower the nation’s death toll from 63.

“This is the right step for the Iranian government to admit responsibility, and it gives people a step toward closure with this admission,” said Payman Parseyan, a prominent Iranian-Canadian in western Canada who lost a number of friends in the crash.

“I think the investigation would have disclosed it whether they admitted it or not. This will give them an opportunity to save face.”

The Associated Press contributed to this report.