Police spokesman Sgt. Michael Andraychak said officers in riot gear Monday tore down a barricade protesters had built to block the main entrance and stormed the Turk Street building, owned by the Archdiocese of San Francisco, the San Francisco Chronicle reported.
Occupy San Francisco protesters had said they believed the building had been empty for five years.
George Wesolek, a spokesman for the archdiocese, said the building had been used for music classes for the nearby Sacred Heart Cathedral High School until as recently as 18 months ago. Wesolek said the archdiocese was considering leasing the building and using the revenue to provide financial aid for low-income Sacred Heart students.
"This is definitely not a vacant building," Wesolek said. "It's not forgotten. It has a purpose."
The Chronicle said the archdiocese signed a citizens' arrest for protesters Sunday night on charges of trespassing and graffiti.
Andraychak said the protesters had "stockpiled" bricks and cans of paint on the roof and blocked windows and doors with plywood and chairs.
"They had no intention of leaving," Andraychak said.
No one was injured during the arrests.
Mayor Ed Lee said protesters concerned about vacant buildings should make a list of them and give it to city officials rather than taking over a building.
"Identifying a building is one thing," Lee said. "When you occupy it and it's not in a condition of livability, it could be a danger for everybody.
"I personally would love to see every vacancy in the whole city have some plan and activity going on in it."