An Oakland man was arrested for wearing a fake police uniform, toting a replica gun and live ammunition, and even bringing along a German Shepherd to a weekend cherry festival in San Leandro, authorities said Tuesday.

Sergio Taylor, 20, was taken into custody Saturday after officers on patrol at the festival saw him in a “K-9” uniform with law enforcement insignia emblazoned on his shirt, according to San Leandro police.

The Berkeley Police Department issued a warrant for Taylor’s arrest in May after an incident at Kip’s Bar and Grill, where he allegedly wore the uniform, possessed a Taser and pointed a handgun at a crowd of more than 50 people during a fight.

Surveillance cameras from the Berkeley incident captured video of Taylor in the uniform trying to get the crowd to disperse by brandishing the gun, said Byron White, a police spokesman.

“It was a cause for concern,” White said. “We’re not trained that way. I don’t know if any security should be behaving that way.”

San Leandro police began following Taylor after he was seen getting into a black Crown Victoria resembling a police car, said Lt. Robert McManus, a San Leandro police spokesman.

Officers following him found the car abandoned, but then they found the suspect in a Ford Taurus with markings that resembled a police vehicle.

They pulled over Taylor, who was accompanied by a 39-year-old man and a German Shepherd, and found a replica Glock pistol concealed under a seat and live ammunition in the car, police said. The gun apparently resembled firearms carried by local law enforcement.

“This was a dangerous situation, as Taylor looked like a police officer, yet he is not, and he was carrying a Taser, replica firearm and live ammunition, which he is prohibited from possessing,” McManus said in a statement.

Private, unarmed security officers were contracted for the festival, but Taylor was not employed by that firm, McManus said. It is unclear why Taylor was walking around the event.

The 39-year-old man in Taylor’s vehicle was detained at the scene, but he has not been arrested. San Leandro police released the dog to Taylor’s family.

Taylor is being held at Santa Rita Jail without bail.

Investigators said his Facebook and Instagram profiles include photos of him armed with a rifle and notes his employment with an Oakland-based private security agency.

Officials said Taylor has a history of faking police credentials in the East Bay. In 2018, he was found guilty of impersonating a federal law enforcement officer while trying to purchase a motorcycle in San Leandro.

He paid for the bike with a fraudulent $10,000 check and drove away from the transaction in an unmarked vehicle outfitted with a siren and emergency lights. Investigators found the motorcycle and police equipment at Taylor’s home.

Other law enforcement agencies are investigating whether Taylor is the suspect in other police impersonations around the Bay Area.

Gwendolyn Wu is a San Francisco Chronicle staff writer. Email: gwendolyn.wu@sfchronicle.com Twitter: @gwendolynawu