Iran has agreed to send black boxes from the Ukrainian jet downed earlier this year to Kiev for analysis, an Iranian official said Wednesday, ending an impasse over the recordings from the aircraft.

Top Iranian officials earlier had refused to hand over the flight’s recordings from before the crash which killed 176 people on Jan. 8.

Iran initially denied shooting down the aircraft, but on Jan. 31 admitted to shooting down the passenger jet unintentionally.

IRAN ADMITS TO 'UNINTENTIONALLY' SHOOTING DOWN UKRAINIAN PLANE, SAYS IT MISTOOK AIRCRAFT AS HOSTILE TARGET 

Tehran’s civil aviation authority also invited other interested countries to read the data, Farhad Parvaresh, the head of Iran’s delegation at the U.N.’s International Civil Aviation Organization (ICAO), told Reuters.  Those killed included 82 Iranians, 57 Canadians and 11 Ukrainians.

Crews also count transfer the boxes to France if needed, Canadian Foreign Minister François-Philippe Champagne said. Canadian Prime Minister Justin Trudeau urged Iran to send the boxes to France, one of few countries with the capability to read damaged black boxes.

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

“We will have our experts there present so we can better assess [if there] was any tampering with the black boxes,” Champagne added. Canada is expected to have an active role in the investigation following advocacy from Trudeau.

Under U.N. rules, Iran is expected to retain control over the investigation.

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.

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

CLICK HERE TO GET THE FOX NEWS APP

Gen. Amir Ali Hajizadeh, the head of the aerospace division of Iran’s Revolutionary Guard, said the pilot and crew had done nothing wrong and 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.

Hajizadeh accepted “full responsibility” and said when he learned the plane had been downed, “I wished I was dead.”