The area of Dhaka has been inhabited since the first millennium. The city rose to prominence in the 17th century as a provincial capital and commercial center of the Mughal Empire in South Asia. Dhaka was the capital of Mughal Bengal for 75 years. As the center of the muslin trade in Bengal, it was one of the most prosperous cities in the Indian subcontinent. The medieval city was named in honor of the Mughal Emperor Jahangir and hosted the seat of the Mughal Subahdar (governor), Naib Nazims and Dewans (prime ministers). Medieval Dhaka's glory peaked in the 17th and 18th centuries, when it was home to merchants from across Eurasia. The Mughals decorated the city with well-laid out gardens, tombs, mosques, palaces and forts. The city was once called the Venice of the East. Under the British Empire, the city saw the introduction of electricity, railways, cinemas, Western-style universities and colleges and a modern water supply. It became an important administrative and educational center in Eastern Bengal and Assam after 1905. In 1947, after ending of British rule, it became the administrative capital of East Pakistan. It was declared as the legislative capital of Pakistan in 1962. In 1971, it became the capital of an independent Bangladesh. Article 5 of the Constitution of Bangladesh declares Dhaka as the capital of the republic.
Since its establishment as a modern capital city, the population, area, and social and economic diversity of Dhaka have grown tremendously. Dhaka is now one of the most densely industrialized regions in the country. By the 21st century, it emerged as a megacity, which is now listed as a beta-global city by the Globalization and World Cities Research Network (GaWC). Dhaka is a major financial center in the region, being home to many local and international companies. Its stock exchange has over 750 listed companies. The city hosts over 50 diplomatic missions and the headquarters of BIMSTEC. The city's culture is known for its cycle-rickshaws, cuisine, art festivals and religious diversity. The old city is home to around 2000 buildings from the Mughal and British periods, including notable structures such as the Bara Katra and Choto Katra caravansaries. The city's modernist national assembly is one of the largest parliaments in the world.
The origins of the name for Dhaka are uncertain. Once dhak trees were very common in the area and the name may have originated from it. Alternatively, this name may refer to the hidden goddessDhakeshwari, whose temple is located in the south-western part of the city. Another popular theory states that Dhaka refers to a membranophone instrument, dhak which was played by order of SubahdarIslam Khan I during the inaugurating of the Bengal capital in 1610.
Some references also say it was derived from a Prakrit dialect called Dhaka Bhasa; or Dhakka, used in the Rajtarangini for a watch-station; or it is the same as Davaka, mentioned in the Allahabad pillar inscription of Samudragupta as an eastern frontier kingdom. According to Rajatarangini written by a Kashmiri Brahman, Kalhana, the region was originally known as Dhakka. The word Dhakka means watchtower. Bikrampur and Sonargaon—the earlier strongholds of Bengal rulers were situated nearby. So Dhaka was most likely used as the watchtower for the fortification purpose.