Gulbarga and the area around it was a part of the ancient Chalukyan kingdom of Badami. The origin of the town of Gulbarga goes back to the local Kakatiya rulers of Warangal. It witnessed a lot of turmoil in the early medieval period. In the early part of the 14th century, it became the part of the Delhi Sultanate. It was captured by Ulugh Khan, one of the generals belonging to the Tughlaq dynasty of Delhi Sultanate, and later captured by Mohammed bin Tughlaq, the Sultan of Delhi. It remained a part of the Delhi Sultanate until the death of Mohammed bin Tughlaq. Later it became a part of the Bahamani kingdom. The Bahamani kings made it their capital from 1347 to 1428. In the 17th century, it was annexed by Aurangzeb, the last great Mughal ruler and inducted into the Mughal Empire. In the 18th century, Gulbarga came under the erstwhile rulers of Hyderabad.