More than 20 years after state officials ordered cities to address the hazards posed by unreinforced brick buildings, about 150 in San Francisco still have not been fixed.

Many of the buildings are churches; some of them haven't been used in years. A handful are owned by the city. All are in violation of a city law that required property owners to stabilize the buildings, which can easily collapse in an earthquake.

Since the law was passed, almost 2,000 brick structures in San Francisco have been retrofitted. But city officials say they're still struggling to bring the rest of the unreinforced masonry buildings up to standards.

Brick buildings historically have caused the majority of deaths in earthquakes worldwide. In 1986, California required cities to devise a plan to address the danger; San Francisco passed its law in 1992.

In unreinforced brick structures, masonry serves as the building's frame as opposed to wood or steel, which are considered much safer.

Brick buildings were routinely constructed in San Francisco through the 1930s, especially in Chinatown and the Tenderloin neighborhoods. The fire-resistant material was embraced in a city bedeviled by fires - including six devastating infernos between 1849 and 1851. Builders turned away from erecting brick buildings after several brick schoolhouses crumbled in the 1933 Long Beach earthquake.

Building owners in San Francisco have cited cost and historical preservation requirements as reasons for not yet completing retrofits. The city Department of Building Inspection and the city attorney's office are working with property owners to help them comply with the retrofit law, and in some instances have filed lawsuits to compel action.

City engineers also are concerned about the seismic safety of other types of buildings, including brittle or "nonductile" concrete frame buildings, which are commonly used for parking garages and warehouses.