“The Islamic Republic of Iran deeply regrets this disastrous mistake,” President Hassan Rouhani said on Twitter soon after the military released its statement. He offered condolences to the victims’ families and said investigations were underway. The military said the person responsible would face legal consequences…

“The little credibility that the Islamic Republic had among its supporters suffered a major blow tonight,” said Rouzbeh MirEmbrahim, an independent Iran analyst in New York and a consultant with the United Nations. “This tragedy undermines the image Iran has cultivated as a military power and weakened it significantly both regionally and internationally.”

On social media, Iranians began expressing anger toward the military soon after the announcement, many of them using the term “harshest revenge,” which officials had repeatedly promised in the wake of the American drone strike that killed Maj. Gen. Qassim Suleimani, a powerful Revolutionary Guards commander, last week.

“They were supposed to take their harsh revenge against America, not the people,” wrote Mojtaba Fathi, a journalist.