A boundary-layer analysis is presented for the two-dimensional nonlinear convection of an infinite-Prandtl-number fluid in a rectangular enclosure, in the limit of large Rayleigh numbers. Particular emphasis is given to the analysis of the periodic boundary layers, and on the removal of the singularities that appear near the corners of the cell. It is argued that this later step is necessary to ensure the correctness of the boundary-layer assumptions. Numerical values are obtained for the heat transfer and stress characteristics of the flow.