In the run-up to his expedition Shivaji appealed to a sense of Deccani patriotism, that Southern India was a homeland that should be protected from outsiders. His appeal was somewhat successful, and in 1677 Shivaji visited Hyderabad for a month and entered into a treaty with the Qutubshah of the Golkonda sultanate, agreeing to reject his alliance with Bijapur and jointly oppose the Mughals. In 1677, Shivaji invaded Karnataka with 30,000 cavalry and 40,000 infantry, backed by Golkonda artillery and funding. Proceeding south, Shivaji seized the forts of Vellore and Gingee; the latter would later serve as a capital of the Marathas during the reign of his son Rajaram I.