FREMONT -- Police say a drunken man tried to break into a home early Monday morning because he thought someone was chasing him with a gun, not realizing it was an armed security guard who'd just kicked him out of a local bar.

Officers were called at 12:25 a.m. to the 100 block of I Street in Niles after a homeowner dialed 911 to report that a drunken man was saying he was being chased by a man with a gun, police Spokesman Geneva Bosques said.

The homeowner handed the man the phone and he tried to speak but was rambling and seemed very drunk, Bosques said.

Police later learned the man had been at the El Camino Real bar at 37667 Niles Blvd., just a short distance away from the home, and was booted from bar by a security officer.

"The drunk was so intoxicated he was confused with the armed security guard at the El Camino who kicked him out," Bosques said.

The suspect, Juan Torres, age 38, was arrested for being drunk in public.

Contact Natalie Neysa Alund at 510-293-2469. Follow her at Twitter.com/nataliealund.