Iran is facing mounting international criticism and growing protests at home after admitting to “unintentionally” downing a Ukrainian passenger jet this week, killing all 176 people on board, having initially denied responsibility.

The plane was shot down early Wednesday in the capital Tehran, just hours after Iran launched a missile attack on US bases in Iraq in retaliation for the killing of top general Qassem Soleimani.

Iran’s Revolutionary Guard revealed on Saturday that it knew hours later that its air defences had caused the crash, but for days after the incident, numerous Iranian officials denied mounting claims that the plane was probably downed by a missile.

As time passed, however, the evidence became too overwhelming to deny. Videos posted online by witnesses showed the plane apparently being struck by a fast-moving object, before plummeting to the ground.

The head of the guard’s aerospace division said his unit accepted “full responsibility” for the accident in an address broadcast on state TV on Saturday.

Iran plane crash: Ukraine Boeing 737 comes down near Tehran Show all 18 1 /18 Iran plane crash: Ukraine Boeing 737 comes down near Tehran Iran plane crash: Ukraine Boeing 737 comes down near Tehran People stand near the wreckage after a Ukrainian plane carrying 176 passengers crashed near Imam Khomeini airport in Tehran ISNA/AFP via Getty Iran plane crash: Ukraine Boeing 737 comes down near Tehran People and rescue teams are pictured amid bodies and debris All 176 people on board a Ukrainian passenger plane were killed when it crashed shortly after taking off, Iranian state media reported ISNA/AFP via Getty Iran plane crash: Ukraine Boeing 737 comes down near Tehran One of the engines State news agency IRNA said 167 passengers and nine crew members were on board the aircraft operated by Ukraine International Airlines Iran Press via Reuters Iran plane crash: Ukraine Boeing 737 comes down near Tehran Rescue teams work at the scene AFP via Getty Iran plane crash: Ukraine Boeing 737 comes down near Tehran Passengers' belongings West Asia News Agency via Reuters Iran plane crash: Ukraine Boeing 737 comes down near Tehran Members of the International Red Crescent collect bodies of victims EPA Iran plane crash: Ukraine Boeing 737 comes down near Tehran Rescue teams work amidst debris AFP via Getty Iran plane crash: Ukraine Boeing 737 comes down near Tehran A relative of a victim reacts at Boryspil International Airport, outside Kiev Reuters Iran plane crash: Ukraine Boeing 737 comes down near Tehran Rescue workers search the scene where a Ukrainian plane crashed in Shahedshahr, southwest of the capital Tehran, Iran, Wednesday, Jan. 8, 2020. A Ukrainian airplane with more than 170 people crashed on Wednesday shortly after takeoff from Tehran's main airport, killing all onboard. (AP Photo/Ebrahim Noroozi) Ebrahim Noroozi AP Iran plane crash: Ukraine Boeing 737 comes down near Tehran TOPSHOT - People and rescue teams are pictured amid the wreckage after a Ukrainian plane carrying 176 passengers crashed near Imam Khomeini airport in the Iranian capital Tehran early in the morning on January 8, 2020, killing everyone on board. - The Boeing 737 had left Tehran's international airport bound for Kiev, semi-official news agency ISNA said, adding that 10 ambulances were sent to the crash site. (Photo by Rouhollah VAHDATI / ISNA / AFP) (Photo by ROUHOLLAH VAHDATI/ISNA/AFP via Getty Images) ROUHOLLAH VAHDATI ISNA/AFP via Getty Iran plane crash: Ukraine Boeing 737 comes down near Tehran Rescue workers carry the body of a victim of an Ukrainian plane crash in Shahedshahr, southwest of the capital Tehran, Iran, Wednesday, Jan. 8, 2020. A Ukrainian airplane carrying 176 people crashed on Wednesday shortly after takeoff from Tehran's main airport, killing all onboard. (AP Photo/Ebrahim Noroozi) Ebrahim Noroozi AP Iran plane crash: Ukraine Boeing 737 comes down near Tehran Part of the wreckage Iran Press via Reuters Iran plane crash: Ukraine Boeing 737 comes down near Tehran Debris of a plane belonging to Ukraine International Airlines, that crashed after taking off from Iran's Imam Khomeini airport, is seen on the outskirts of Tehran, Iran January 8, 2020. Nazanin Tabatabaee/WANA (West Asia News Agency) via REUTERS ATTENTION EDITORS - THIS IMAGE HAS BEEN SUPPLIED BY A THIRD PARTY WANA NEWS AGENCY West Asia News Agency via Reuters Iran plane crash: Ukraine Boeing 737 comes down near Tehran Rescue workers search the scene where an Ukrainian plane crashed in Shahedshahr, southwest of the capital Tehran, Iran, Wednesday, Jan. 8, 2020. A Ukrainian airplane carrying 176 people crashed on Wednesday shortly after takeoff from Tehran's main airport, killing all onboard. (AP Photo/Ebrahim Noroozi) Ebrahim Noroozi AP Iran plane crash: Ukraine Boeing 737 comes down near Tehran Rescue team work at the scene where an Ukrainian plane crashed in Shahedshahr, southwest of the capital Tehran, Iran, Wednesday, Jan. 8, 2020. A Ukrainian airplane carrying 176 people crashed on Wednesday shortly after takeoff from Tehran's main airport, killing all onboard. (AP Photo/Ebrahim Noroozi) Ebrahim Noroozi AP Iran plane crash: Ukraine Boeing 737 comes down near Tehran CORRECTS YEAR - Debris is seen from a plane crash on the outskirts of Tehran, Iran, Wednesday, Jan. 8, 2020. A Ukrainian airplane carrying at least 170 people crashed on Wednesday shortly after takeoff from Tehranâ€™s main airport, killing all onboard, state TV reported. (AP Photos/Mohammad Nasiri) Mohammad Nasiri AP Iran plane crash: Ukraine Boeing 737 comes down near Tehran Officials inspect the wreckage EPA Iran plane crash: Ukraine Boeing 737 comes down near Tehran Debris is seen from an Ukrainian plane which crashed as rescue workers search the scene in Shahedshahr, southwest of the capital Tehran, Iran, Wednesday, Jan. 8, 2020. A Ukrainian airplane carrying 176 people crashed on Wednesday shortly after takeoff from Tehran's main airport, killing all onboard. (AP Photo/Ebrahim Noroozi) Ebrahim Noroozi AP

Explaining the events that led to the missile launch, general Amir Ali Hajizadeh said his forces had beefed up defences and were at the “highest level of readiness”, fearing that the US would retaliate. An officer made the “bad decision” to open fire on the plane after mistaking it for a cruise missile, he added.

Iran’s president Hassan Rouhani said his country “deeply regrets this disastrous mistake”, and promised that those behind the incident would be prosecuted.

“My thoughts and prayers go to all the mourning families,” he wrote on Twitter.

Despite the belated admission, many in Iran have expressed anger at the country’s leadership for days of denial and obfuscation, at a time when the families of the victims were searching for answers.

The attempted cover-up appears to have all but extinguished a moment of national unity that came in the wake of the US killing of Soleimani, the 62-year-old leader of Iran’s Quds Force, whom many viewed as a national hero.

Up to 1,000 protesters chanted slogans in Tehran against the authorities on Saturday, the semi-official Fars news agency said in a rare report on anti-government unrest.

Demonstrators ripped up pictures of Soleimani, while on Twitter videos showed protesters demanding Mr Rouhani step down over the disaster.

In Twitter messages, angry Iranians condemned the government for the attempted cover-up, and video clips on social media showed a large protest at a university in Tehran, where students chanted “Death to the dictator” in protest at the government’s handling of the plane crash.

“Unintentionally? What does it mean? They concealed this huge tragic news for days just to mourn for Soleimani. Shame on you,” said Reza Ghadyani, in Tabriz city.

It is the second time in recent months that protests have targeted the Iranian leadership. In November, young and working-class Iranians took to the streets to protest against fuel price rises. The protests turned political, with demonstrators burning pictures of senior officials and calling on clerical rulers to step down.

Somewhere between 300 and 1,500 protesters are believed to have been killed in the crackdown that followed.

The Iranian government’s handling of the incident has sparked anger in the international community, too.

British prime minister Boris Johnson has joined growing calls from the international community for an international investigation into the crash. Four British nationals were among those killed in the disaster, along with 82 Iranians, at least 57 Canadians and 11 Ukrainians.

On Saturday Mr Johnson said Iran's admission was “an important first step” and that it was "vital that all leaders now pursue a diplomatic way forward" to avoid conflict.

“We now need a comprehensive, transparent and independent international investigation and the repatriation of those who died. The UK will work closely with Canada, Ukraine and our other international partners affected by this accident to ensure this happens,” he added.

Canadian prime minister Justin Trudeau says his government now expects “full cooperation from Iranian authorities” in the investigation into the incident.

He said: "What Iran has admitted to is very serious. Shooting down a civilian aircraft is horrific. Iran must take full responsibility. Canada will not rest until we get the accountability, justice, and closure that the families deserve."

The Ukrainian prosecutor general’s office, meanwhile, said it is investigating possible willful killing and aircraft destruction in its probe of the crash of a Ukrainian airliner in Iran.

A senior Trump administration official, who spoke on condition of anonymity, said Iran had made an "awful mistake", adding that "Iran's reckless actions have again had devastating consequences".

It comes as Donald Trump on Friday doubled down on his insistence that the killing of Soleimani – the incident that presaged the downing of the jet – had been necessary.

As Democrats and other critics questioned claims from the Trump administration that Soleimani was plotting “imminent” attacks on US interests, he told Fox News that four US embassies had been at risk, including the one in Baghdad.