The Marathas had important positions in the administrative and military systems of Ahmednagar and Bijapur.
Marathas did not have any large, well-established states; however, a number of influential Maratha families, namely, the Mores, the Ghatages, the Nimbalkars, etc., exercised local authority in some areas.
The Maratha ruler Shahji Bhonsle and his son, Shivaji, consolidated the Maratha kingdom. Shahji acted as the kingmaker in Ahmednagar, and defied the Mughals.
Taking advantage of the unsettled conditions, Shahji tried to set up a semi-independent principality at Bangalore, as Mir Jumla, the leading noble of Golconda, tried to carve out such a principality on the Coromandal coast. Further, Shivaji's attempted to carve out a large principality around Poona.
Shahji had left the Poona jagir to his neglected senior wife, Jija Bai and his minor son, Shivaji.
Shivaji was brave and intellect since his childhood. When he was merely 18 years old, he overran a number of hill forts near Poona—Rajgarh, Kondana, and Torna in the years 1645-47.
In 1647, after the death of his guardian, Dadaji Kondadeo, Shivaji became his own master and the full control of his father's jagir came under his control.
In 1656, Shivaji conquered Javli from the Maratha chief, Chandra Rao More and started his reigning career.
The conquest of Javli made Shivaji the undisputed master of the Mavala region or the highlands and freed his path to the Satara region and to the coastal strip, the Konkan.
Mavali foot-soldiers became a strong part of Shivaji’s army. With their support, Shivaji conquered a series of hill forts near Poona.
In 1657, the Mughal invasion of Bijapur saved Shivaji from Bijapur reprisal. Shivaji first entered into negotiations with Aurangzeb and asked him for the grant of all the Bijapuri territories he held and other areas including the port of Dabhol in the Konkan. Later Shivaji betrayed and changed his side.
Shivaji resumed-his career of conquest at the expense of Bijapur. He burst into the Konkan, the coastal strip between the Western Ghats and the sea, and seized the northern part of it.
The ruler of Bijapur sent Afzal Khan (one of the premier nobles) along with 10,000 troops. Afzal Khan had been given instructions to capture Shivaji by any possible means.
In 1659, Afzal Khan sent an invitation to Shivaji for a personal interview, promising to get him pardoned from the Bijapuri court. Convinced that this was a trap, Shivaji went with full preparation, and murdered Afzal Khan. Shivaji captured all Afzal Khan’s property, including equipment and artillery.
Shivaji soon became a legendary figure. His name passed from house to house and he was credited with magical powers. People flocked to him from the Maratha areas to join his army, and even Afghan mercenaries who had been previously in the service of Bijapur, joined his army.
Aurangzeb was anxious because of the rising of the Maratha power near to the Mughal frontiers. Poona and adjacent areas, which had been parts of the Ahmednagar kingdom had been transferred to Bijapur by the treaty of 1636. However, these areas were now again claimed by the Mughals.
Aurangzeb instructed Shaista Khan, the new Mughal governor of the Deccan (he was also related to Aurangzeb by marriage), to invade Shivaji's dominions and Adil Shah, the ruler of Bijapur, was asked to cooperate.
Adil Shah sent Sidi Jauhar, the Abyssinian chief, who, invested Shivaji in Panhala. Getting trapped, Shivaji escaped and Panhala came under the control of the Bijapuri forces.
Adil Shah took no further interest in the war against Shivaji, and soon came to a secret understanding with him. This agreement freed Shivaji to deal with the Mughals.
In 1660, Shaista Khan occupied Poona and made it his headquarters. He then sent detachments to seize control of the Konkan from Shivaji.
Despite harassing attacks from Shivaji, and the bravery of Maratha defenders, the Mughals secured their control on north Konkan.
In 1663, on one night, Shivaji infiltrated into the camp and attacked on Shaista Khan, when he was in his harem (in Poona). He killed his son and one of his captains and wounded Khan. This daring attack of Shivaji put Khan into disgrace. In anger, Aurangzeb transferred Shaista Khan to Bengal, even refused to give him an interview at the time of transfer as was the custom.
In 1664, Shivaji attacked Surat, which was the premier Mughal port, and looted it to his heart's content.
After the failure of Shaista Khan, Aurangzeb deputed Raja Jai Singh of Amber, who was one of the most trusted advisers of Aurangzeb, to deal with Shivaji.
Unlike Shaista Khan, Jai Singh did not underestimate the Marathas rather he made careful diplomatic and military preparations.
Jai Singh planned to strike at the heart of Shivaji's territories i.e. fort Purandar where Shivaji had lodged his family and his treasure.
In 1665, Jai Singh besieged Purandar (1665), beating off all Maratha attempts to relieve it. With the fall of the fort at sight, and no relief likely from any quarter, Shivaji opened negotiations with Jai Singh.
After hard bargaining with Shivaji, the following terms we agreed upon −
Out of 35 forts held by Shivaji, 23 forts were surrendered to the Mughals;
Remaining 12 forts were left with Shivaji on condition of service and loyalty to the Mughal throne;
Territory worth four lakhs of huns a year in the Bijapuri Konkan, which Shivaji had already held, was granted to him.
The Bijapur territory worth of five lakhs of huns a year in the uplands (Balaghat), which Shivaji had conquered, was also granted to him. In return for these, Shivaji was to pay 40 lakhs huns in instalments to the Mughals.
Shivaji asked them to be excused from personal service. Hence, a mansab of 5,000 was granted to his minor son, Sambhaji.
Shivaji promised, however, to join personally in any Mughal campaign in the Deccan.
Jai Singh, later, cleverly threw a bone of contention between Shivaji and the Bijapuri ruler. But the success of Jai Singh's scheme depended on Mughal support to Shivaji in making up from Bijapur territory worth the amount he had yielded to the Mughals.
Jai Singh had considered the alliance with Shivaji from the starting point of the conquest of Bijapur to the entire Deccan. However, the Mughal-Maratha expedition against Bijapur failed. Shivaji who had been deputed to capture fort Panhala was also unsuccessful.
As the plan failed, Jai Singh persuaded Shivaji to meet with Aurangzeb at Agra. Jai Singh though that if Shivaji and Aurangzeb could be reconciled, then Aurangzeb might be persuaded to give greater resources for a renewed invasion on Bijapur. But Shivaji’s meeting with Aurangzeb also became futile.
When Shivaji met Aurangzeb, he kept him in the category of 5,000 mansabdar (the rank, which had been granted to his minor son). Further, the emperor, whose birthday was being celebrated, did not find time to speak to Shivaji. Therefore, Shivaji walked off angrily and refused imperial service.
Since Shivaji had come to Agra on Jai Singh's assurances, Aurangzeb wrote to Jai Singh for advice. In return, Jai Singh strongly argued for a lenient treatment for Shivaji. However, in 1666, before any decision could be taken, Shivaji escaped from the detention.