No one was injured, San Francisco police spokesman Sgt. Neville Gittens said.
Police received a call about 1:15 p.m. after an employee reported finding something suspicious in the bathroom of the Starbucks store, located at a busy intersection in San Francisco.
Police evacuated close to 100 people from the Starbucks and an apartment above the store and shut down traffic on the street before disabling the device at 2:10 p.m., Gittens said.
"This was a good device. If it had exploded, it would have caused injuries or damage," said Gittens, who would not describe the size of the device.
Police allowed people back into the apartment building and reopened the street shortly after defusing the device, but the store remained closed Monday evening while police investigated.
Gittens said he could not give any further details and said an investigation is under way. Seattle-based Starbucks also declined to provide further details.
Vandals have previously targeted Starbucks in San Francisco.
In 2003, police said the windows of 17 Starbucks were clouded with glue and some of the door locks were jammed. The vandals also posted phony notices purporting to be from Starbucks management announcing the company's intention to abandon some of their San Francisco stores to make room for more locally owned coffee houses.