NEWARK, New Jersey (Reuters) - Three children trapped all weekend in a New Jersey bedroom with a gunmen and the dead body of their mother were freed early Sunday when police burst through the door and stopped the gunman with a single shot, authorities said.

Slideshow ( 3 images )

The suspect died of his wound shortly after the siege ended.

A SWAT team using flash-bang grenades stormed a back door of the home in Trenton about 3:45 a.m. EDT Sunday and moved to the second floor, where they fired the single shot at gunman Gerald Tyrone Murphy before taking him into custody, State Police Colonel Rick Fuentes told a news conference.

Another official said the children had been trapped inside the room for at least the length of the standoff.

“I have every reason to believe that the kids were in the room and that they were possibly restrained during” the standoff, Mercer County prosecutor Joseph Bocchini Jr. said at the news conference.

Officials said the girls, both teenagers, may have been physically abused by Murphy, 38, a convicted sex offender.

The partially decomposed bodies of Carmelita Stevens, 44, believed to be Murphy’s girlfriend, and her 13-year-old son were discovered in different second-floor bedrooms of the two-story home in Trenton, a rundown city that is the state capital, authorities said.

Murphy had threatened to harm his hostages - Stevens’ two daughters, 16 and 18, and her 4-year-old son - and claimed to have a gun and explosives. Officials declined to say whether any explosives were recovered.

Murphy had barricaded himself inside the house on Friday afternoon after police were called to check on a resident there, a Trenton police spokesman said on Friday.

Police went to the home after an unidentified relative of Stevens reported to authorities that neither she nor some of her children had been seen since April 24, Trenton Police Director Ralph Rivera said.

Once there, officers noticed an odor and discovered the partially decomposed body of a woman, but pulled back when they saw Murphy had a gun, Rivera said.

Police said Murphy was not the father of any of the children.

Fuentes said hostage negotiators had maintained contact with Murphy throughout the ordeal, passing food and water through an upper window. Residents on the surrounding block were evacuated during the standoff as a precaution.

Murphy had an extensive criminal record, including arrests for robbery, a weapons offense and child endangerment, according to Bocchini. An arrest warrant had been issued in Pennsylvania for Murphy after he failed to register there as a convicted sex offender.