A New Mexico police officer died Sunday after being stabbed while responding to a report of trespassing, according to officials.

Las Cruces Police Department patrol officer Jonah Hernandez responded to a call reporting trespassing in the 300 block of South Valley Drive at around 5 p.m. Sunday, the police department wrote on Facebook.

The investigation is in its preliminary stages, but police believe Hernandez was stabbed by the suspect who allegedly trespassed onto the property.

Hernandez was transported to MountainView Regional Medical Center, where he died from his injuries.

NEW MEXICO BILL TO LOWER INCOME TAXES AND CAP INVESTMENT TAX BREAK ADVANCES

Las Cruces Police Department car

A New Mexico police officer was fatally stabbed on Sunday after responding to a report of trespassing. (Las Cruces Police Department)

Police also learned that the suspect was shot and killed by a witness who observed at least part of the interaction between Hernandez and the alleged trespasser. 

A witness then used Hernandez’s radio to call for help.

TRUCK SLAMS INTO GAS PUMPS IN NEW MEXICO, IGNITING FIREBALL

Las Cruces Police Department badge

Jonah Hernandez was transported to MountainView Regional Medical Center, where he died from his injuries. (Las Cruces Police Department)

CLICK HERE TO GET THE FOX NEWS APP

Hernandez, from El Paso, Texas, had worked for the Las Cruces Police Department for two years. He leaves behind his wife and two sons, ages 10 and 2.

The suspect has been identified only as a 29-year-old man. Police said his name will not be released until his next of kin have been notified.