Travel and tourism has evolved significantly over thousands of years. In ancient times, travel was primarily for trade, empire building by kings, or to sites of religious significance. The development of inns in large towns aided travelers' needs. In the Middle Ages, travel became more difficult and dangerous. The industrial revolution led to urbanization and mass immigration to cities, causing people to travel to escape and find leisure. Resorts and spas grew in popularity in the 17th-18th centuries. The development of railways and later air travel further catalyzed both business and leisure travel. Today, travel and tourism is a major global industry providing employment and foreign exchange earnings worldwide.