Suspected killer of California officer Ronil Singh had 7 alleged accomplices: Officials Newman police officer Ronil Singh, 33, was shot dead early on Dec. 26.

A Mexican man accused of gunning down a Northern California police officer was taken into custody Friday following a massive manhunt that ended with a surrender after authorities surrounded a home in Bakersfield, California, 200 miles south of where the crime took place, officials said.

The suspect, Gustavo Perez Arriaga, fled after shooting Newman police Cpl. Ronil Singh, 33, at a traffic stop just before 1 a.m. Wednesday, according to the Stanislaus County Sheriff's Department.

An undocumented immigrant with known gang affiliations, the 32-year-old Arriaga tried to flee to Mexico after his alleged crime, authorities said Friday. Stanislaus County Sheriff Adam Christianson said that Arriaga crossed into Arizona from Mexico illegally a couple of years ago and it is believed that he had been working on farms in California's Central Valley.

Kern County Sheriff's Donny Youngblood told reporters on Friday that when SWAT deputies surrounded a home in Bakersfield, Arriaga surrendered without incident

By late Friday night, a total of seven people had been arrested for either misleading authorities about Arriaga’s whereabouts or aiding him in evading authorities – including a woman described as Arriaga’s girlfriend and two of his brothers, according to police officials and ABC-owned station KFSN.

Arriaga's brother, Adrian Virgen, and co-worker, Erik Razo Quiroz, were arrested and accused of acting as accomplices, authorities said.

Another brother Conrado Virgen Mendoza, 34, and Arriaga's girlfriend Ana Leyde Cervantes, 30 were arrested on Friday for aiding Arriaga in evading authorities.

Youngblood said that three additional people were also arrested in the South Valley for aiding and abetting Arriaga, according to KFSN.

Youngblood identified those suspects as Bernabe Madrigal Castaneda, 59, Erasmo Villegas, 36 and Maria Luisa Moreno, 57. He said the trio was inside the house where Arriaga was arrested. Kern County has a policy prohibiting the release of booking photos.

Arriaga, who worked as a farm laborer, has two prior DUI arrests and is affiliated with the Sureños street gang, authorities said. Cpl. Singh pulled him over because he believed he was under the influence of alcohol.

Singh's brother, Reggie Singh, burst into tears as he thanked law enforcement for working so quickly to make an arrest.

"I'd like to thank you from the bottom of my heart," he said at a news conference, overcome with emotion.

The motive is not clear, authorities said, adding they believe Arriaga was alone when he committed the crime.

Authorities said Arriaga was placed in the slain officer's handcuffs as they transported him back to Stanislaus County.

Ronil Singh, a native of Fiji, had been with the Newman Police Department since July 2011, the sheriff's office said. He previously served with the Merced County Sheriff’s Department, according to a statement from California Gov. Jerry Brown.

Ronil Singh is survived by his wife and 5-month-old son, according to officials.

Stanislaus County Sheriff Adam Christianson did not hesitate to rail against the state's newly enacted SB 54 law, which is credited with making California a "sanctuary state." The law, passed in October as a rebuke to the president's immigration policies, limits how much California law enforcement can cooperate with federal authorities like Immigration and Customs Enforcement (ICE).

“This is a criminal illegal alien with prior criminal activity that should have been reported to ICE. We were prohibited, law enforcement was prohibited, because of sanctuary laws, and that led to the encounter with Officer Singh,” said Christianson, who has worked with the president directly on immigration issues and appeared at an anti-sanctuary city roundtable in May.

President Donald Trump weighed in on the shooting on Thursday, before new details emerged about Arriaga.

"There is right now a full scale manhunt going on in California for an illegal immigrant accused of shooting and killing a police officer during a traffic stop," he tweeted Thursday. "Time to get tough on Border Security. Build the Wall!"

ABC News' Jenna Harrison contributed to this report.