"There was a hole in the roof where he fell through just as we were ordering him to put his hands up," police Sgt. Wilfred Williams told reporters. "I've responded to several different silent alarm calls at banks, but this is the first time when someone fell through a roof."
The suspect, whose name was not released, was not seriously injured. Police said he weighed 230 pounds.
Police said he had tried to use a crowbar to break into the ATM inside a Bank of America branch in the Portola neighborhood around 3:45 a.m.
The man apparently got into the bank through a ventilation shaft, which triggered a silent alarm. He was spotted by officers as he fled, police Chief Greg Suhr told a local television station.
Officers notified the K9 unit after realizing the burglar had fled onto the roof. A Fire Department ladder truck was called in as part of the search.
The suspect was spotted on the roof. As he was trying to surrender, he fell into the apartment. Police said no money had been taken.