The history of Coal mining goes back thousands of years, with early mines documented in ancient China, the Roman Empire and other early historical economies. It became important in the Industrial Revolution of the 19th and 20th centuries, when it was primarily used to power steam engines, heat buildings and generate electricity. Coal mining continues as an important economic activity today, but has begun to decline due to the strong contribution coal plays in global warming and environmental issues, which result in decreasing demand and in some geographies, peak coal.