Updated

A man hid in the closet of a suburban Philadelphia home and later came out to attack his estranged wife and her boyfriend, investigators claimed.

Jason William Beck, 36, of Norristown allegedly broke into the home on Monday and hid in the master bathroom closet before his estranged wife returned home and went to bed with her boyfriend.

ARKANSAS MAN ACCUSED OF BEATING WIFE, SETTING HER ON FIRE

Beck burst out of the closet and sprayed mace before stabbing and beating one of the victims with a baseball bat, police said.

Both the woman and her boyfriend were treated a local hospital and three children who were home at the time weren’t hurt.

Police said Beck surrendered outside the home, telling responding officers he was the suspect.

FOUR BODIES FOUND ON LONG ISLAND IN APPARENT HOMICIDE, POLICE SAY

Beck has been charged with aggravated assault, burglary, trespass and terroristic threats.

Court documents indicate Beck requested representation by the Montgomery County public defender’s office, which said no attorney had yet been assigned.

The Associated Press contributed to this report.