Garfield Smith, 45, was taken into custody this afternoon and booked into jail on charges of making a false report of a bomb, placing a fictitious bomb and making terrorist threats, police said.
The scare began at about 10:50 a.m. when a man told an employee at a flower shop on the corner of Polk Street and Golden Gate Avenue that there was a bomb in his backpack, then placed the backpack on the ground and walked away, Lt. Troy Dangerfield said.
Not knowing what was inside the pack, police shut down nearby streets and called in a bomb squad.
A shelter-in-place order was issued for the San Francisco Superior Court building at McAllister and Polk streets, and a nearby construction site was evacuated, Dangerfield said.
A message sent out over the loudspeaker at the nearby Federal Building warned employees to stay away from the Golden Gate Avenue side of the building.
At about 1:45 p.m., the bomb squad detonated the backpack. The blast made the ground shake outside City Hall and could be heard from several blocks away.
Dangerfield said it is not yet clear whether the backpack contained explosives, but said it is "quite normal" for police to detonate suspicious packages.
Police reopened the streets once the bomb squad had cleared out.