A 41-year-old Bakersfield man was arrested early Sunday after a SWAT team was called to a home where he had barricaded himself.

Robert Shields was booked on suspicion of assault causing great bodily injury, criminal threats, and participation in a criminal street gang after allegedly assaulting and injuring Phillip Carpenter in the 10100 block of Greenacres Drive.

Sheriff's deputies were dispatched to that location about 2 a.m. Sunday after Shields reportedly threatened to kill Carpenter and others, authorities said.

The suspect then fled to his residence in the 300 block of Redwood Meadows Drive in Bakersfield and barricaded himself in an attic for about an hour, deputies said.

Eventually the suspect surrendered to the SWAT team and was arrested, deputies said.