A Northern California man was arrested Thursday night after police said he shot and killed his wife inside their Oakley home and critically wounded his 16-year-old stepdaughter, who fled the house with two younger children.

Muthama Martin Njenga, 44, was taken into custody outside the Oakley Police Department shortly after the shooting, according to authorities. He was booked on suspicion of homicide and attempted homicide, along with a firearm enhancement alleging great bodily injury or death.

Police said the shooting stemmed from a dispute between Njenga and his wife at their home on the 500 block of Marathon Drive. Officers responding shortly after 6:40 p.m. Thursday found the 50-year-old woman in an upstairs bedroom with at least one gunshot wound to the chest. She was pronounced dead at the scene.

The stepdaughter suffered multiple gunshot wounds, police said. After being shot, she got two elementary school-age children out of the house and fled with them to a nearby location on Shullsburg Way.

Officers found the teenager there around 6:42 p.m. and began providing medical aid with help from residents, police said. She was taken to a local hospital and underwent surgery. She remained in critical condition, according to police.

Njenga and his wife’s two younger children were placed in the care of extended family members, police said.

The investigation began when officers received two related calls within minutes of each other.

At 6:37 p.m., police were dispatched to the 700 block of Shullsburg Way for a report of a 16-year-old shooting victim. Four minutes later, a man called police and said he was on his way to the department to turn himself in after shooting his wife at their home. He told officers he still had the gun.

The two locations are about 250 yards apart, police said.

Officers entered the Marathon Drive home at 6:43 p.m. and found the woman. At 6:48 p.m., Njenga arrived at the police department, where Oakley officers and Contra Costa County sheriff’s deputies took him into custody without incident.

Anyone with information about the case is asked to call the Oakley Police Department at 925-625-8060.