stylistic:style_transfer, quality:corruption, linguistic:translation
Lahore (/ l ə ˈ h ɔːr / lə- HOR; Punjabi: لہور; Urdu: لاہور) is the capital and largest city of the Pakistani province of Punjab. It is the second largest city in Pakistan, after Karachi, and 26th largest in the world, with a population of over 13 million. Located in north-eastern Punjab, along the River Ravi, it is the largest Punjabi-speaking city in the world. Lahore is one of Pakistan's major industrial, educational and economic hubs. It has been the historic capital and cultural centre of the wider Punjab region, and is one of Pakistan's most socially liberal, progressive, and cosmopolitan cities.

Lahore's origin dates back to antiquity. The city has been inhabited for around two millennia, although it rose to prominence in the late 10th century with the establishment of the fortified Walled City. Lahore served as the capital of several empires during the medieval era, including the Hindu Shahis, Ghaznavids and Delhi Sultanate. It reached the height of its splendor under the Mughal Empire between the late 16th and early 18th centuries and also served as its capital city between 1586 and 1598. During this period, it was one of the largest cities in the world.

The city was captured by the forces of the Persian Afsharid ruler Nader Shah in 1739. Although Mughal authority was briefly re-established, it fell into a period of decline with nominal Mughal control and frequent looting and invasions by the Afghans. After the Mughal rule over Punjab officially ended, the city became heavily contested among the Afghans and the local Punjabi states between 1748 and 1798. The Afghans were eventually driven out of Punjab as the city was captured by the Sukerchakia Misl under Ranjit Singh in July 1799 where he was crowned the Maharaja of Punjab, thus Lahore became the capital of the Sikh Empire in the early 19th century, regaining some of its lost grandeur.

In the aftermath of the Second Anglo-Sikh War, Punjab was annexed by the East India Company in 1849 and Lahore became the capital of British Punjab. Lahore was central to the independence movements of both India and Pakistan, with the city being the site of both the Declaration of Indian Independence and the resolution calling for the establishment of Pakistan. It experienced some of the worst rioting during the Partition period preceding Pakistan's independence. Following the success of the Pakistan Movement and the subsequent partition of British India in 1947, Lahore served as the capital of West Punjab, from 1947 to 1955, and later West Pakistan, from 1955 to 1970.

Lahore exerts a strong cultural influence over Pakistan. A UNESCO City of Literature and major center for Pakistan's publishing industry, Lahore remains the foremost center of Pakistan's literary scene. The city is also a major centre of education in Pakistan, with some of Pakistan's leading universities based in the city. For many years, Lahore was home to Pakistan's film industry, Lollywood, though in recent years most filming has shifted to Karachi. Lahore is a major centre of Qawwali music. The city also hosts much of Pakistan's tourist industry, with major attractions including the Walled City, the famous Badshahi and Wazir Khan mosques, as well as several Sikh and Sufi shrines. Lahore is also home to the Lahore Fort and Shalimar Gardens, both of which are UNESCO World Heritage Sites.