Police in California's Central Valley said a suspect was caught Sunday in the death of a county sheriff's deputy who was shot and killed in what was being called an "execution."

Stanislaus County deputy Dennis Wallace was shot and killed while on duty in Hughson, Calif., near Modesto. Sheriff Adam Christianson said Wallace was shot at a local park while waiting for backup after reporting a suspicious vehicle.

Deputies who arrived on the scene found Wallace with two gunshot wounds to the head, KXTV-TV reported.

“This was an execution,” Christianson said.

A suspect in the shooting, identified as David Machado, was captured in Tulare County, authorities said.

Machado had fled the shooting scene, then carjacked a vehicle in nearby Keyes, Calif.

He was described as a known criminal with existing felony warrants out for his arrest.

So far this year, 121 U.S. police officers have died in the line of duty, 56 of them from gunfire, according to the Officer Down Memorial Page, which tracks police deaths. The total killed by gunfire in 2016 has already exceeded the 2015 total of 39.

Wallace, 53, was a 20-year veteran of the sheriff's department and well known in the organization for his work with the D.A.R.E drug education program. He left behind a wife and family, Christianson said.

Follow Greg Toppo on Twitter: @gtoppo

Police investigate the shooting death of Stanislaus County deputy Dennis Wallace, who was killed while on duty in Hughson, Calif., near Modesto on Nov. 13, 2016.