A suspected illegal immigrant accused of shooting to death a California police officer was arrested on Friday after a two-day manhunt that President Donald Trump cited in his push for building a wall on the border with Mexico, officials said.

Gustavo Perez Arriaga, 32, a Mexican national, was arrested in Bakersfield, a city less than 200 miles (320 km) south of Newman where the officer was shot on Wednesday, Stanislaus County Sheriff Adam Christianson said at a news conference.

The shooting and manhunt in California's agricultural Central Valley entered the national debate over immigration, after Trump tweeted about it in his advocacy for a border wall and Christianson criticized California's sanctuary law for immigrants.