SAN DIEGO — A man caused a scare in downtown San Diego Tuesday when he allegedly waved what looked like an assault-style rifle out the window of a hotel room, but the purported weapon turned out to be a bong.

Officers were patrolling the trolley line about 6:30 p.m. in the area of Park Boulevard and Market Street when someone approached and told them a suspect had brandished an assault-style rifle at them from a third-floor window of the Palms Hotel at 509 Park Blvd., according to San Diego Police Department Capt. Mike Holden.

Officers cordoned off the area, halted trolley traffic and went to the room at the residential hotel where the alleged brandishing occurred, Holden said.

They ordered the occupants out of the room and detained a man and a woman, Holden said.

A search of the premises turned up a gold-colored replica firearm that looked like a smaller version of an AR-15 rifle but was actually a bong that can be used for smoking marijuana, according to Holden, who said the item was found in a refrigerator.

The man, who is in his early 20s, will be booked on suspicion of exhibiting a replica firearm in a threatening manner, Holden said. His name was not immediately available.

The woman was released, Holden said.