The lobby lights came back on around 3:45 p.m. It was not yet clear whether power had been restored to all other parts of the building.
The Hall of Justice, located at 850 Bryant St., houses police headquarters, the district attorney's office, courtrooms and county jails.
Sheriff's Sgt. David Murphy said the outage began around 1:20 p.m. He said proceedings were suspended at all courtrooms except for five.
County jails 3 and 4 on the sixth and seventh floors were affected by the outage, sheriff's spokeswoman Susan Fahey said. She said inmates' movements were restricted while the power was out.
Fahey said an emergency generator was providing some power to the Hall.
Police spokesman Officer Albie Esparza said the outage was not affecting police patrols. He said the police dispatch center is at another facility on Turk Street and that 911 calls were still being answered.
"We just want to make sure that the public knows ... that we will respond if someone calls the police, and everything will be fine," he said.
PG&E spokesman Joe Molica said the Hall of Justice appeared to be the only building affected by the outage.
He said an initial investigation by PG&E crews indicated that the problem was not with PG&E equipment. He said crews were working with building managers at the Hall to determine the cause of the outage.