A mathematical model is proposed for the three-dimensional, nonlinear earthquake analysis of unreinforced brick masonry buildings. In the development of the model, the floors are modeled as rigid diaphragms and it is assumed that the wall elements possess only shear resistance and only in their own planes. The nonlinear effects are taken into account by using the linear equivalent method (LEM), which was used successfully by some researchers in nonlinear soil-structure analysis. In view of data obtained from shaking table experiments by two of the present authors, a bilinear form for the shear modulus of the masonry wall materials and a trilinear form for its viscous counterpart are assumed in the analysis for their variations with the shear strain. The proposed model finds the nonlinear earthquake response through iterations. To assess the model two example problems are presented. The results indicate that the proposed model can be used reliably in the earthquake analyses of unreinforced masonry buildings.