BELL, Calif. – An armed robbery suspect locked himself into aStarbucksrestroom for nearly seven hours Monday morning before surrendering to police after several canisters of tear gas were thrown into thecoffee shop, authorities said.

The 21-year-old man surrendered without incident, and was not armed when he came out, but Sheriff's deputies found a handgun when the store was searched, said Police Capt.Anthony Miranda.

The incident began when a man flagged down a police officer at about 9:30 p.m. Sunday and said he was robbed by a man with a handgun near a Bell hotel, Miranda said.

Officers found an armed suspect near the hotel who fled on foot into the Starbucks and locked himself into the restroom, Miranda said.

Five employees and five customers were safely evacuated by police, Miranda said.

Bell police called a SWAT team and a pair of negotiators from the Sheriff's Department to the scene.

The SWAT team sent about four canisters of tear gas into the store, and after about five minutes the suspect surrendered, Miranda said. His name was not immediately released.