Modern cities depend on energy systems to deliver a range of services such as heating, cooling, lighting, mobility, communications, and so on. This article examines how these urban energy systems came to be, tracing the major transitions from the earliest settlements through to today's fossil-fuelled cities. The underlying theme is "increasing efficiency under constraints" with each transition marked by increasing energy efficiency in service provision, increasing per capita energy use, increasing complexity in the energy system's structure, with innovations driven by a strategic view of the overall system, and accompanied by wider changes in technology and society. In developed countries, the future of urban energy systems is likely to continue many of these trends, with increased efficiency being driven by the constraints of climate change and rising fuel prices. Both supply and demand side technologies are discussed as potential solutions to these issues, with different impacts on the urban environment and its citizens. However in developing