Context The urban heat island (UHI) affects both biogeochemical cycles and human society. Previous studies of UHI indicate urban expansion and local land-cover change can lead to higher temperatures in cities compared to the adjacent countryside. Few studies have examined the joint effects of city- and local-scale factors on urban warming, and their relative importance. Objectives We examined the overall impact of urbanization on urban warming from 1983 to 2011 in Beijing, investigated how city size and the proportion of local developed land jointly influenced the air temperature, and quantified their relative importance over time. Methods We compared temperature trends between urban and reference stations and conducted linear regressions to evaluate the city- and local-scale influences, based on meteorological data and remote sensing data. Results Urbanization significantly influenced trends of the air temperature, especially in summer. Trends of the mean temperature caused by urbanization was 0.3-0.4 A degrees C decade(-1) yearly and 0.4-0.6 A degrees C decade(-1) in summer. The increase of city size and the proportion of local developed land both contributed to urban warming, but their relative importance changed over time and varied seasonally. The local-scale factor played a vital role for the air temperature when the city size was relatively small, and were more important in summer when there was more greenspace at the local scale. However, the city-scale factor may cause stronger heat stress in summer, if there was less greenspace locally. When the city size was very large, the city-scale factor became the only significant factor affecting the air temperature. Conclusion When a city is relatively small, optimizing the composition or configuration of the local land cover could effectively alleviate UHI effects. However, when the city is already large, a more effective way is to control additional sprawl.