A man was taken into custody Thursday nearly six hours after he was allegedly spotted with a gun on a Long Beach street.

Officers responded at 12:45 p.m. to a report of a person with a gun in the 5300 block of Atlantic Avenue, near Market Street, Arantxa Chavarria of the Long Beach Police Department said.

When officers arrived, the suspect barricaded himself inside a building, Chavarria said.

“SWAT officers responded to the scene and entered the location,” she said. “A suspect was taken into custody without incident.”

Gang detectives were involved in the continuing investigation, Chavarria said. No injuries were immediately reported.

Editor’s note: This story was updated with more information from police Friday morning.