A New Mexico State Police officer was fatally shot on a highway Thursday and authorities chased the attacker, killing him in a shootout, officials said.

The officer who was killed has been identified as 28-year-old Darian Jarrott, reported KVIA-TV El Paso. Authorities also released the name of the attacker who was killed, 39-year-old Omar Felix Cueva.

State Police said one of its officers was shot in Luna County between Las Cruces and Deming in a confrontation along Interstate 10 in southern New Mexico.

CAPITOL POLICE OFFICER BRIAN SICKNICK LIES IN HONOR AT CAPITOL; BIDEN, OTHERS PAY RESPECTS

The officer was identified as 28-year-old Darian Jarrott (New Mexico State Police)

They said multiple agencies then pursued the suspect’s vehicle to the Las Cruces area before there was an exchange of gunfire.

The suspect was killed and a Las Cruces police officer was shot.

The officer was taken to a hospital in El Paso with injuries that were not life-threatening, according to Las Cruces police spokesman Danny Trujillo.

WISCONSIN MALL SHOOTING SUSPECT, 17, APPREHENDED IN IOWA, AUTHORITIES SAY

State Police had said they had limited information and two separate shooting scenes 30 miles apart to investigate.

The Las Cruces Police Department closed the interstate near the shooting scene and told drivers to use a different route until the investigation has been completed.

CLICK HERE TO GET THE FOX NEWS APP

New Mexico Gov. Michelle Lujan Grisham has ordered all flags at state buildings lowered to half-staff from Friday to Tuesday to honor the State Police officer killed in the line of duty.