A husband has chopped off a rapist’s penis after seeing him allegedly sexually assaulting his wife.

The 27-year-old spouse was on his way home in Shevchenkovo, a village in the eastern Kharkiv region of Ukraine, when he claimed he saw the attack.

Reports say the couple were spending time with their friends at a local restaurant. At about 1 a.m. the wife left, with her husband following ten minutes later.

But as she walked near her apartment block, the 25-year-old rapist, Dmitry Ivchenko, allegedly attacked her from behind while covering her mouth.

When the victim's husband reached the apartment block, he heard noises coming from the bushes and claimed to see Ivchenko squeezing his victim's throat while raping her.

The furious husband then allegedly attacked the rapist and hit him on the head with a fist, before grabbing his Swiss army knife and chopping his penis off, local media report.

Attorney Dmitry Spaskin said: "The husband lost the ability to control his actions. He did not understand what he was doing."

HOUSTON TEEN TAKES OWN LIFE AFTER SURVIVING SEX TRAFFICKING RING

The rapist’s screams woke up all the residents in the area who rushed to the scene.

The victim's mother immediately reported Ivchenko to the police while others called an ambulance for him as he was bleeding heavily.

Mr. Spaskin said: "After the incident, the husband was in a state of shock and just walked away. He walked about 13 kilometers (eight miles) and reached a neighboring village. There he met an acquaintance and asked to drive him to a police station."

The husband was charged with causing grievous bodily harm and put under house arrest.

He said to local media: "I cannot explain what happened to me at that moment."

FLORIDA MAN, 22, ALLEGEDLY RAPED 10-YEAR-OLD GIRL HE MET THROUGH SNAPCHAT, POLICE SAY

Ivchenko was taken to Shevchenko District Hospital and underwent surgery.

Sergey Mitrakov, the head of the hospital’s surgical unit said: "The patient needs a long-lasting treatment."

Doctors have not speculated on the chances to reattach the penis or whether it will work if it is.

Police were said to be investigating the rape allegations against Ivchenko. He is at the hospital under police surveillance now.

Prosecutor Tetiana Vasileva commented: "The rapist said that he was dumped by his girlfriend a week ago. On the day of the incident, he drank a liter of vodka. He is refusing to say more so far."

CLICK HERE TO GET THE FOX NEWS APP

The female residents of the village support the husband.

Hanna Khaustova said: "Ivchenko tried to hit on me but I told him to stop. Then he said, ‘You will regret it’. I believe any girl from our village could have become his victim. I support the husband. If he had not done it the rapist would have continued to assault girls. I am sorry for the wife. She has a hard time now."

But he could face up to eight years in prison if found guilty and the rapist Dmitry Ivchenko faces up to five years if found guilty.