A police officer in California staged his own suicide to cover up the fact that he had murdered his pregnant girlfriend, authorities said Friday. The officer, identified as 37-year-old Matthew Goff, was found dead in a remote area in Lancaster on Thursday, according to the Los Angeles County Sheriff’s Department.

Investigators initially believed that Goff had taken his own life. However, further investigation revealed inconsistencies in the evidence at the scene, prompting detectives to launch a homicide investigation. They discovered that Goff had shot himself after killing his girlfriend, 35-year-old Yvette Smith, who was eight months pregnant with his child.

Smith’s body was found in Goff’s home in Agua Dulce on Wednesday. The official cause of death for both Smith and Goff has not yet been released.

Goff had been with the Los Angeles Police Department for seven years and was most recently assigned to the LAPD’s Southeast Division. He had a history of domestic violence incidents involving Smith, according to authorities.

The case is being investigated as a murder-suicide, and the motive behind the killings remains under investigation.