NEW YORK (CBSNewYork) — What would you do if you came face-to-face with a man who had just sexually attacked someone you love?

As CBS2’s Hazel Sanchez reported, Mamadou Diallo, 61, was arrested after police said he beat a man to death who was allegedly trying to sexually assault his wife inside their apartment in the Bronx. But his family and friends said he did the right thing.

As he walked back out of Bronx Criminal Court Tuesday night, Diallo showed no emotion as a crowd of friends and family showed their support for the father of three. They cheered when he left the building, CBS2’s Tracee Carrasco reported.

“Everybody is excited that he’s out, but I think nobody would like to be in this situation,” said family friend Abdoul Diallo.

Diallo was charged with manslaughter, and he was released on a recognizance bond after an arraignment late Tuesday, CBS2’s Carrasco reported.

“He tried to do the best to defend his wife,” said a family friend also named Mamadou Diallo.

“He did what he had to do,” said the defendant’s son Abdul Diallo.

It all began around 9:30 p.m. Monday at an apartment on Washington Avenue and East 168th Street in the Morrisania section.

Diallo’s wife, Nenegale, was at home when she answered a knock at her door. That’s when police said an attacker, now identified as 43-year-old Earl Nash, pushed his way in and began beating Nenegale and ripping her clothes off.

Nenegale’s sister was in a back room of the apartment and rushed out to break up the attack, and then the wife was able to break free and grab a phone to call her husband, who was outside the building, police said.

“They were fighting for like 20 minutes and my mother finally called my dad,” Abdul Diallo said, “and then when he came, he ran into the guy in the hallway.”

Police said that call sent Mamadou Diallo running into the building where he caught his wife’s attacker who was running away. A fight broke out in the hall and police said Diallo returned with a tire iron, beating Nash unconscious in the elevator, WCBS 880’s Alex Silverman reported.

Abdul Diallo walked in after the confrontation.

“The guy was in the elevator, he was all bloody and the neighbors were surrounding him,” he said.

Nash — who has been arrested 19 times before on charges including robbery, arson, assault, attempted unlawful imprisonment, and drug-related arrests — was rushed to Lincoln Medical and Mental Health Center, where he died from his injuries.

Most people who spoke to CBS2 said they did not think Mamadou Diallo deserved to be charged with any crime.

“Mamadou Diallo, he’s a very nice guy. He don’t bother nobody, and he’s not even violent,” family friend Kamafing Sissoko told CBS2’s Magdalena Doris. “But in this situation, that’s something else. You have to do anything to protect your family.”

“He’s looking, looking for somebody to help his family,” said family friend Ibrahima Jalloh. “And somebody come into his house attacking his family.”

Abdul Diallo also said none of the neighbors came to help his mother while she was being attacked, 1010 WINS’ Glenn Schuck reported.

“I’m mad because 20 minutes and nobody heard the commotion that was going on? Nobody came in to see what was going on,” he said. “They just came at the end when my dad was fighting with the guy. It was too late.”

Nenegale Diallo was recovering Tuesday afternoon from cuts and bruises she suffered during the incident.

Mamadou Diallo is set to return to court on June 27. The investigation is ongoing.

The Mayor’s office released a statement in response to the incident.

“Any crime that results in violence and death is of utmost concern to the Mayor,” the statement said. “NYPD will be conducting an investigation to determine the facts.”

CBS2 also reached out to the Bronx District Attorney’s office and Gov. Andrew Cuomo’s office to get their response to the public outcry, and had not heard back as of 5 p.m.

CBS2’s Sanchez also spoke to a defense attorney, who said similar cases have gone to trial and resulted in a conviction for the defendants. But the defendants in those cases have faced light sentences, the defense attorney said.

The story has generated strong opinions among the CBSNewYork audience on our Facebook page:

“What is wrong with this picture??? The creep breaks into the home, tries to rape the guy’s wife, and the husband defends his wife, and HE is arrested???” wrote Faith Boschmann.

“Let the man go he was in his own house and he was saving his wife,” wrote Andrew Bellomo.

What do you think? Let us know.