The fire was reported at 1:06 p.m. at 2300 Third St., located on the southwest corner of Third and 20th streets.
The blaze was extinguished in about an hour and did not injure any firefighters or civilians, fire spokeswoman Mindy Talmadge said today.
The building where the fire burned is a former police station that has been vacant for 16 years, according to police Capt. Paul Chignell, who currently oversees the department's Bayview Station.
The structure, built in the early 1900s, cannot be demolished because of its historical significance, police said. The building has had to be boarded up to prevent squatters and copper thieves from entering, according to police.
The cause of the fire remains under investigation, Talmadge said.
The blaze briefly disrupted service on San Francisco Municipal Railway's T-Third line. Service resumed on the line by about 2:15 p.m.