Mohammed Ali Najafi said said he killed her accidentally after surprising her in the bathroom. (File)

When Mohammed Ali Najafi turned himself in to Iranian authorities Tuesday night, he wore a nice suit and a smile and was greeted warmly by police.

But Najafi, a former mayor of Tehran, was there to make a confession. He said he had killed his wife, Mitra Ostad, ,the night before after threatening her with a gun because she refused to grant him a divorce.

Najafi, 67, a reformist politician, said he killed her accidentally after surprising her in the bathroom at their home in a wealthy Tehran neighborhood.

The dramatic case, Najafi's bizarre and televised confession, and the hands-off approach of investigating authorities have scandalized, enraged and baffled Iranians, who have long criticized the preferential treatment given to government officials in matters before the law.

State television filmed Najafi, who also once served as education minister and is a graduate of the Massachusetts Institute of Technology, as he sat un-handcuffed and casually sipping tea in a police commander's office. The officials shook Najafi's hand and bowed deferentially, while a reporter interviewed him.

"We had an argument and then I showed her this gun to scare her while she was getting ready to take a bath," Najafi said. "She panicked and attacked me in order to take the gun and I mistakenly touched the trigger."

In a separate segment aired by the state broadcaster IRIB, the reporter handles the alleged weapon used in the killing and counts the number of bullets left in the chamber, asserting that two struck Ostad and that a third was fired into the wall.

"So far, [this case] is not a criminal investigation, even by the standards of the Iranian judiciary," Tehran-based lawyer Shady Sadr said on Twitter.

"The tests on the murder weapon, from the finger prints to matching the bullets with the ones in the victim's body, cannot possibly be done in less than 24 hours," she said, adding that "the murder weapon should not be given to a random person to play with in front of the camera."

Najafi's political history has added further intrigue to the case. He resigned from the mayorship last year after serving for only eight months, citing poor health.

But his resignation came after he began investigating corruption allegations involving his predecessor, a hard-line conservative with ties to Iran's powerful security forces. Around the same time, photographs of Najafi and Ostad, his new wife, began circulating on the internet.

On Wednesday, after authorities transferred him to Tehran Criminal Court, he gave a separate interview to reporters, this time in prison garb.

"Mitra was controlling all of my moves and contacts," he said, claiming she had threatened to reveal "confidential information" to the public and intelligence agencies. He offered no evidence to substantiate this claim.

Najafi said he had contemplated killing himself both before and after Ostad's killing.

According to Amnesty International, the London-based rights group, the Iranian legal system's "deeply-entrenched discrimination against women" often prevents them from getting a divorce, even if they are subjected to domestic violence.