ELIZABETH -- Police say a city man was vital in ending a hostage situation, where another man was barricaded with his girlfriend's 6-year-old son in an apartment on Sunday.

The standoff in the third-floor apartment at the Mravlag Manor complex ended without incident, but things could have gone much differently had it not been for 46-year-old city resident Andre Williams -- a longtime friend of the man barricaded inside.

Police had been trying to get the man, whose identity has not yet been released, to surrender for hours, but their negotiations with him were proving unsuccessful.

At around 9 a.m., a woman inside the complex had fled the building following a domestic dispute and her 6-year-old son was left behind, according to Elizabeth Mayor Chris Bollwage.

Williams, who said he'd been friends with the man for more than 20 years, asked police if he could try and talk to him.

Bollwage confirmed Williams was "extremely helpful and instrumental to police."

Williams said that at first, authorities were skeptical of his help, but ultimately agreed and provided him with a bulletproof vest in case the man inside was armed.

"The chief of the squad asked, 'Can you get him out?'" Williams recalled. "I said, 'Absolutely, I can get him out.'"

Authorities escorted him to the front door of the apartment where the two men began talking to each other through the door.

"At first he wasn't responsive," Williams said, "but after two-and-a-half hours he became responsive ... I said the police were at the door, but I'm here. I need to talk to you."

Through the door, the two friends just talked -- about life, about their children.

"Having kids of my own, it made me push even harder," said Williams. "Just talked about life, man, about his son, his kids. About how important it was for him to come out without them coming in."

Eventually, the man gave in.

"I said, 'Listen man, come on, I got you,'" Williams said. "He opened the door, I walked in ... and they allowed me to go get his (girlfriend's) son first before they apprehended him."

According to Bollwage, no weapons were found on the man, but he noted police would be conducting a search of the apartment.

Bollwage also said the county prosecutor's office would provide information about the man's charges in the near future.

After the man surrendered, police walked him outside where a crowd was gathered, filming with their cellphones and yelling at the man as he was escorted to a police vehicle and driven away.

Staff writer Jessica Remo contributed to this report.

Spencer Kent may be reached at skent@njadvancemedia.com. Follow him on Twitter @SpencerMKent. Find the Find NJ.com on Facebook.