Iran hanged a woman on Saturday who was convicted of murdering a man she alleged was trying to rape her, drawing swift international condemnation for a prosecution several countries described as flawed.

Reyhaneh Jabbari was hanged at dawn for premeditated murder, the official IRNA news agency reported. It quoted a statement issued by the Tehran Prosecutor Office Saturday that rejected the claim of attempted rape and said that all evidence proved that Jabbari had plotted to kill Morteza Abdolali Sarbandi, a former intelligence agent.

The United Nations as well as Amnesty International and other human rights groups had called on Iran's judiciary to halt the execution, which was carried out after the country's Supreme Court upheld the verdict. The victim's family could have saved Jabbari's life by accepting blood money but they refused to do so.

According to her 2009 sentencing, Jabbari, 27, stabbed Sarbandi in the back in 2007 after purchasing a knife two days earlier.

"The knife had been used on the back of the deceased, indicating the murder was not self-defense," the agency quoted the court ruling as saying.

Britain, Germany, and a group of European parliamentarians, among others, condemned the execution, as did the United States.

"There were serious concerns with the fairness of the trial and the circumstances surrounding this case, including reports of confessions made under severe duress," State Department Spokeswoman Jen Psaki said in a statement.

"We join our voice with those who call on Iran to respect the fair trial guarantees afforded to its people under Iran's own laws and its international obligations," she added.

IRNA said the police investigation found that Jabbari sent a text message to a friend saying she would kill Sarbandi three days before the deadly incident.

Iranian media reports say Sarbandi's family insisted on their legal rights under the Islamic principle of "an eye for an eye" partly because Jabbari accused Sarbandi of being a rapist in what became a highly publicized media campaign.

In a statement ahead of the hanging Amnesty said the investigation had been "deeply flawed" and that Jabbari's claims "do not appear to have ever been properly investigated." The group is opposed to the death penalty and has long condemned Iran's use of capital punishment.

The number of executions in Iran has spiked this year, with over 170 people executed already in the first quarter of the year, according to the United Nations.

Amnesty says 369 people were publicly put to death in the Islamic Republic last year. The majority of executions are for drug smuggling, which Iranian officials say reflects the large quantities of opium trafficked through Iran from Afghanistan to Europe.

Ahmed Shaheed, the U.N. Special Rapporteur for human rights in Iran, said in April that imposing the death penalty goes against the current international trend to encourage a moratorium on it and later abolish it.

He had strongly urged Iranian authorities to immediately halt executions.