OTTAWA -- Iran's president acknowledged Saturday that an Iranian missile took down a Ukrainian jetliner on Wednesday killing all 176 civilians on board.

President Hassan Rouhani posted the news on Twitter early Saturday morning in Tehran, saying an Iranian military investigation concluded "missiles fired due to human error caused the horrific crash."

The admission came a day after Iran denied claims being made by Canada, Britain and the United States that Ukraine International Airlines Flight 752 was shot down by Iran, possibly accidentally. There were 57 Canadian citizens on the plane and 138 of the passengers were bound for Canada, many of them students and professors returning after spending the December break visiting relatives in Iran.

Rouhani said investigations will continue to "identify and prosecute this great tragedy and unforgivable mistake."

"My thoughts and prayers go to all the mourning families," he said. "I offer my sincerest condolences."

In a written statement, Prime Minister Justin Trudeau acknowledged the grim news.

"Our focus remains closure, accountability, transparency and justice for the families and loved ones of the victims," he said. "This is a national tragedy, and all Canadians are mourning together. We will continue working with our partners around the world to ensure a complete and thorough investigation, and the Canadian government expects full co-operation from Iranian authorities."

Nadia Eghbali, whose aunt, uncle and eight-year-old cousin died in the crash, said it was hard to process all of her emotions after hearing the Iranian government admit that they accidentally shot the plane down.

"We're in complete shock, we're full of so much emotion. There's anger, there's so many things, we just don't know why this happened," said Eghbali. "At a time like this, they needed to stop all flights. It should have been stopped to prevent anything like this."

Nina Saeidpour, whose friend Kasra Saati died in the crash, said Iran's admission stirred up "mixed emotions." Saeidpour, from Calgary, said Saati had travelled to Iran over the holidays for a reunion with his wife and two children.

"In some ways we are happy that our government just came forward and said that they did it instead of hiding everything. On the other hand everybody is again in shock about why such a thing should happen," Saeidpour said.

There are 10 Canadian officials from Global Affairs Canada and two investigators from the Transportation Safety Board in Turkey waiting to get visas to enter Iran so they can both be part of the investigation and provide consular services to families of Canadian victims. Only two visas had been issued as of Friday night, said Canadian Foreign Affairs Minister Francois-Philippe Champagne.

He urged Iran to issue the visas quickly.

The plane's downing came hours after Iran launched missile attacks at two military bases hosting U.S. troops in Iraq. Those attacks were retaliation for the U.S. killing of Iran's top general, Qassem Soleimani, in an American airstrike in Baghdad on Jan. 3.

A military statement delivered on Iranian state television said the civilian airliner was mistaken for a "hostile target" when it turned toward a sensitive military site belonging to Iran's Revolutionary Guard, an elite unit of the country's military.

"In such a condition, because of human error and in a unintentional way, the flight was hit," the statement read.

Iran's Foreign Minister Mohammad Javad Zarif still pointed some blame towards the Americans, saying on Twitter, "human error at time of crisis caused by U.S. adventurism led to disaster."

Iranian Revolutionary Guard commander Gen. Amir Ali Hajizadeh told Iranian state television his unit was responsible for the accidental shootdown and said when he learned about what happened, "I wished I were dead."

Ukraine International Airline's senior executive said Iran should not have kept their civilian airspace open amid the hostilities with the U.S.

Airline vice-president Ihor Sosnovskiy said at a news conference in Ukraine the decision was "absolutely irresponsible."

"When you act in war then you act however you wish," he said. "But there must be protection around ordinary people. If they are shooting somewhere from somewhere, they are obliged to close the airport."

Transport Canada has warned Canadian air operators not to enter the airspace of Iraq or Iran due to the potential risk.

Ukraine's president said Iran must issue an official apology and pay compensation for the disaster. President Volodymyr Zelenskiy said Ukraine expects a "full and open investigation, bringing the perpetrators to justice."

A team of 45 Ukrainian investigators is already in Iran and Ukraine's Foreign Minister Vadym Prystaiko said it was given access Friday to the flight recorders recovered from the plane's wreckage and recordings from air-traffic controllers.

The dead also included citizens of Iran, Ukraine, Sweden, the United Kingdom, Afghanistan and Germany. Champagne said Canada is leading the group of nations to advocate with "one single voice."

-- With files from Salmaan Farooqui in Toronto, Chris Reynolds in Montreal and The Associated Press.

This report by The Canadian Press was first published Jan. 11, 2020.