An intruder repeatedly stabbed a California man while his girlfriend and her 1-year-old child slept next to him, police said.

The intruder has been identified as Alvino Alaniz, the woman’s 31-year-old ex-boyfriend, according to Turlock Police Department spokesman Sgt. Russell Holeman.

Police responded to the home at around 1:50 a.m., the Modesto Bee reported. Alaniz had broken in, kicked down the bedroom door and stabbed the victim multiple times, Holeman said.

The 34-year-old victim managed to fight off the suspect and flee to a neighbor’s house, where he called the police. Responding officers detained Alaniz nearby and recovered the weapon, Holeman said.

GIRL, 15, CHARGED MURDER IN STABBING ON WASHINGTON DC METRO TRAIN

The victim was taken to an area hospital with life-threatening injuries. By late morning his condition was improving, Holeman said. His identity was not released.

His girlfriend and her 1-year-old were unharmed, the Turlock Journal reported. A 3-year-old child sleeping in another room was also unharmed, the Bee reported.

CLICK HERE TO GET THE FOX NEWS APP

Alaniz is facing charges of attempted murder, willful child endangerment, and burglary. He remains in custody at the Stanislaus County Jail in lieu of a $500,000 bail.

Turlock is located in Northern California, about 100 miles east of San Francisco.