The administrative Dhaka District was first established in 1772. But, the existence of urbanised settlements in the area that is now Dhaka city – dates from the 7th century. The present day Savar was the capital of the Sanbagh Kingdom during seventh and eighth century. The city area of Dhaka was ruled by the Buddhist kingdom of Kamarupa and the Pala Empire before passing to the control of the Hindu Sena dynasty in the 9th century. Many believe that the name of the city was derived after the establishment of the Goddess Dhakeshwari's temple by Ballal Sena in the 12th century. Dhaka and its surrounding area was identified as "Bengalla" around that period. The town itself consisted of a few market centres like Lakshmi Bazar, Shankhari Bazar, Tanti Bazar, Patuatuli, Kumartuli, Bania Nagar and Goal Nagar. After the Sena dynasty, Dhaka was successively ruled by the Turkish and Afghan governors descending from the Delhi Sultanate before the arrival of the Mughals in 1608.