By Associated Press

SAN FRANCISCO — A suspected drunken driver accused of killing a California police officer who pulled him over was captured Friday as he tried to flee back to Mexico, where he lived before illegally crossing into the U.S., authorities said.

The sheriff leading the investigation blamed California's sanctuary law for preventing local authorities from reporting Gustavo Perez Arriaga to U.S. immigration officials for two previous drunken driving arrests. If he had been deported, the sheriff said, Cpl. Ronil Singh of the tiny Newman Police Department would still be alive.

Kern County Sheriff Donny Youngblood, center, speaks at a news conference in Bakersfield, Calif., after suspect Gustavo Perez Arriaga surrendered and was taken into custody in Lamont, Calif., Friday, Dec. 28, 2018. (Alex Horvath/The Californian via AP)

"We can't ignore the fact that this could have been preventable," Stanislaus County Sheriff Adam Christianson told reporters, asking why the state was "providing sanctuary for criminals (and) gang members. It's a conversation we need to have."

Following a statewide manhunt, Perez Arriaga was arrested on a murder warrant in a house near Bakersfield, about 200 miles (320 kilometers) southeast of where Singh was shot Wednesday.

As a SWAT team prepared to raid the house, Perez Arriaga came out with his hands up and surrendered. He was sent north in the slain officer's handcuffs, Kern County Sheriff Donny Youngblood said.

Perez Arriaga crossed the border in Arizona several years ago and had worked a variety of jobs as a laborer, including at several dairies. The 33-year-old Mexico native had gang affiliations and multiple Facebook pages with different names, Christianson said.

The shooting came amid an intense political fight over immigration, with President Donald Trump and congressional Democrats at odds over funding for a border wall that has forced a partial government shutdown.

Trump tweeted about Singh's killing Thursday, saying it was "time to get tough on Border Security. Build the Wall!"

California's sanctuary law limits cooperation between local authorities and U.S. immigration officials and has drawn scorn from the Trump administration. It includes more than 800 exceptions for violent crimes and felonies and bars police from asking people about their citizenship status.

Former state Sen. Kevin de Leon, the Democrat who wrote the legislation, said it's unfair to blame the law for the officer's death.

Christianson, who was at a meeting with Trump and slams California's law in a video posted by the White House in May, said the measure prohibited his department from sharing Perez Arriaga's gang ties, "other active warrants" and past DUI arrests with federal immigration authorities. He didn't give details on the other warrants.

That suggests law enforcement could have apprehended Perez Arriaga previously, de Leon said.

"He should've been in the physical custody of law enforcement," de Leon said. To blame the law "is highly irresponsible."

Gov. Jerry Brown has said the law strikes a balance between protecting families and ensuring consequences for serious criminals. His spokesman said Friday that if the suspect was a known gang member, police could have provided that information to federal authorities.

"California law fully permits the sharing of information on dangerous gang members," spokesman Evan Westrup said.

A federal judge upheld the law earlier this year after a Trump administration challenge.

Christianson called for stricter laws at a news conference Friday as Singh's brother wept beside him.

Authorities also arrested five other people, including Perez Arriaga's brother, 25-year-old Adrian Virgen, and a co-worker, 32-year-old Erik Razo Quiroz, who lied to police to try to protect him, Christianson said. He said both men also were in the country illegally.

Three people also were arrested at the home near Bakersfield for helping Perez Arriaga, Youngblood said.

The 33-year-old officer was an immigrant, too, arriving legally from his native Fiji to fulfill his dream of becoming a police officer, authorities said. Singh had a newborn son and joined the 12-officer Newman police force in 2011.

Newman Police Chief Randy Richardson called Singh a patriot.

"This is a man that loved his country. This is a man that worked hard for what he believed in. He believed in this community," the chief said at a Friday night community vigil honoring the officer.

Residents, friends, relatives and fellow officers held back tears as they eulogized Singh during the candlelight memorial.

Richard said Thursday that Singh, the department's first officer to die in the line of duty, drove more than two hours each way to attend the police academy in Yuba City. He joined the Merced County sheriff's office as a reserve officer and worked as an animal control officer in Turlock before being hired in Newman.

English was Singh's third language. He had a thick accent but took speech classes to improve his communication, the chief said.