By Jim Melwert

HATFIELD, Pa. (CBS) —A Montgomery County man is accused of lying in wait in his estranged wife’s house, then attacking her and her boyfriend when they least expected it.

Hatfield police say, on Monday, Jason Beck broke into his estranged wife’s home on Fairview Avenue, and hid in the bedroom closet for more than six hours, waiting for her and her boyfriend to go to bed, says detective sergeant Jay Ciarlello.

“The lights went out, he then emerged from the closet, pepper sprayed the two victims in the bedroom.”

Ciarlello says Beck beat the man with a baseball bat and stabbed him, and also assaulted the woman before running out of the house, where he was caught by police.

Ciarlello says it’s like a nightmare out of a movie.

“You go into you bedroom for the night, retire after a long day, lying in bed turn the lights off and you have someone emerging from a closet attacking you.”

Beck was served with a protection from abuse order on Friday and there were three children in the home at the time who were not injured.

Beck is facing Aggravated Assault, Burglary, Criminal Trespass and other charges, held in county prison on half a million dollars cash bail.

The man and woman have been released from the hospital and are recovering.