The Mughal Empire's province Gujarat (now in India) was managed by the viceroys appointed by the emperors. The emperor Muhammad Shah (1719–1748) died in 1748 and he was succeeded by his son Ahmad Shah Bahadur. He appointed Vakhatsingh, brother of Mahárája Abheysingh of Marwar as a viceroy but he never took a charge. Sensing opportunity in weakening Mughal power, the Marathas and the Mughal nobles started plotting to establish themselves in Gujarat. The Maratha houses, Gaikwar and Peshwa, engaged in a struggle and finally brokered a peace. Jawan Mard Khan, who was in charge of Ahmedabad, had to surrender to them after a long siege. Thus the Marathas established themselves firmly in Gujarat in 1752. In 1754, Ahmad Shah Bahadur was deposed and Alamgir II came to power on the Mughal throne.

Viceroys under Ahmad Shah Bahadur (1748–1754) Mahárája Vakhatsingh, Fifty-ninth Viceroy, 1748 The emperor Muhammad Shah died in 1748 and he was succeeded by his son Ahmad Shah Bahadur. Shortly after his accession Mahárája Vakhatsingh, brother of Mahárája Abheysingh, was appointed fifty-ninth viceroy of Gujarát. When he learned what was the state of the province, he pleaded that his presence would be more useful in his own dominions, and never took up his appointment of viceroy. Vakhatsingh was the last viceroy of Gujarát nominated by the imperial court, for although by the aid of the Maráthás Fakhr-ud-daulah was of importance in the province, he had never been able to establish himself as viceroy. In this year also occurred the death of Khushálchand Sheth, the chief merchant of Ahmedabad.

Khanderáv Gáikwár appointed Rághavshankar his deputy at Áhmedábád, and Safdar Khán Bábi issued from Áhmedábád with an army to levy tribute from the chiefs on the banks of the Sabarmati River. When Fakhr-ud-daulah, the former viceroy, heard of the appointment of Mahárája Vakhatsingh, seeing no chance of any benefit from a longer stay in Gujarát, he retired to Delhi. In 1748, Ásif Jáh, Nizám-ul-Mulk, died at an advanced age, leaving six sons and a disputed succession.

Disorder spreads About the same time Bálájiráv Peshwa, who was jealous of the power of the Gáikwár, sent a body of troops, and freed Rangoji from the hands of Khanderáv Gáikwár. During these years adventurers, in different parts of the country, taking advantage of the decay of the central power, endeavoured to establish themselves in independence. Of these attempts the most formidable was the revolt of one of the Pátan Kasbátis who established his power so firmly in Pátan that Jawán Mard Khán found it necessary to proceed in person to reduce him. Shortly afterwards Jawán Mard Khán deemed it advisable to recall his brothers Safdar Khán and Zoráwar Khán, who were then at Unjha under Pátan, and took them with him to Áhmedábád. Fidá-ud-dín Khán who had been residing at Atarsumba (near Vadodara) now asked permission to return to Áhmedábád, but as Jawán Mard Khán did not approve of this suggestion, Fidá-ud-dín departed to Bharuch and there took up his residence. Janárdhan Pandit marched to Kaira (Kheda) and the Bhíl district to levy tribute, and Khanderáv appointed Shevakrám his deputy.

Surat Affairs, 1750 In the meantime at Surat, Sayad Achchan endeavoured to consolidate his rule, and with this view tried to expel Háfiz Masûud Habshí, and prevent him again entering the city. But his plans failed, and he was obliged to make excuses for his conduct. Sayad Achchan then oppressed other influential persons, until eventually the Habshí and others joining, attacked him in the citadel. Except the English leader Mr. Lamb, who considered himself bound by the deed signed in 1747 in favour of Sayad Achchan, all the merchants of Surat joined the assailants. Among the chief opponents of Sayad Achchan were the Dutch, who sending ships brought back Safdar Muhammad Khán from Thatta, and established him as governor of Surat. The English factory was next besieged, and, though a stout resistance was made, the guards were bribed, and the factory plundered. In 1750 Sayad Achchan, surrendering the citadel to the Habshí, withdrew first to Bombay and then to Poona, to Bálájiráv Peshwa. Shortly afterwards, in consequence of the censure passed upon him by the Bombay Government for his support of Sayad Achchan, Mr. Lamb committed suicide. Wearied by these continual contests for power, the merchants of Surat asked Rája Raghunathdás, minister to the Nizám, to choose them a governor. Rája Raghunathdás accordingly nominated his own nephew, Rája Harprasád, to be governor, and the writer of the Mirăt-i-Áhmedi to be his deputy. But before Rája Harprasád could join his appointment at Surat, both he and his father were slain in battle.

In 1750, occurred the deaths of Rája Ráisingh of Idar, of Safdar Khán Bábi of Balasinor, and of Fidá-ud-dín Khán, who had for some time been settled at Bharuch.

Jawán Mard Khán and the Peshwa, 1750 Jawán Mard Khán, who, seeing that they were inclined to become permanent residents in Gujarát, was always opposed to the Gáikwár's power, now entered into negotiations with Bálájiráv Peshwa. He chose Patel Sukhdev to collect the Marátha revenue and asked the Peshwa to help him in expelling Dámáji's agents. The Peshwa, being now engaged in war in the Dakhan with Salábat Jang Bahádur, son of the late Nizám, was unable to send Jawán Mard Khán any assistance. Towards the close of the year Jawán Mard Khán started from Áhmedábád to collect tribute from the Sábarmati chiefs. Returning early in 1751, at the request of Jetha Patel a subordinate of Bhávsingh Desái, he proceeded to Banod or Vanod under Viramgam and reduced the village. Áli Muhammad Khán, the author of the Mirăt-i-Áhmedi, who about this time was raised in rank with the title of Bahádur, states that owing to the Marátha inroads most of the districts had passed entirely into their possession; in others according to agreements with Jawán Mard Khán they held a half share. Consequently, in spite of new taxes, the entire remaining income of the province was only four lákhs of rupees, and it was impossible to maintain the military posts or control the rebellious Kolis.

The Peshwa and Gáikwár, 1751 In 1751, the Peshwa, decoying Dámájiráv into his power, imprisoned him and forced him to surrender half of his rights and conquests in Gujarát. Taking advantage of the absence of the Gáikwár and his army in the Dakhan, Jawán Mard Khán marched into Sorath. He first visited Ghogha, and then levying tribute in Gohilwad advanced into Kathiawad and marched against Nawanagar, and, after collecting a contribution from the Jám, returned to Áhmedábád. In 1752, as soon as the news reached Gujarát that the Maráthás’ share in the province had been divided between the Peshwa and Gáikwár, Momín Khán, who was always quarrelling with the Gáikwár's agent, sending Varajlál his steward to Bálájiráv Peshwa begged him to include Cambay in his share and send his agent in place of the Gáikwár's agent. Bálájiráv agreed, and from that time an agent of the Peshwa was established at Cambay. In the same year Raghunáthráv, brother of the Peshwa, entering Gujarát took possession of the Rewa and Mahi Kántha districts and marched on Surat. Shiaji Dhangar was appointed in Shevakrám's place as Dámáji's deputy, and Krishnáji came to collect the Peshwa's share.

Bharuch Independent, 1752 Up to this time the city of Bharuch had remained part of the Nizám's personal estate, managed by Abdúllah Beg, whom, with the title of Nek Álam Khán, Ásif Jáh the late Nizám-ul-Mulk had chosen his deputy. On the death of Abdúllah Beg in 1752 the emperor appointed his son to succeed him with the same title as his father, while he gave to another son, named Mughal Beg, the title of Khertalab Khán. During the contests for succession that followed upon the death of the Nizám in 1752, no attempt was made to enforce the Nizám's claims on the lands of Bharuch; and for the future, except for the share of the revenue paid to the Maráthás, the governors of Bharuch were practically independent.

Pándurang Pandit Repulsed at Áhmedábád, 1752 The Peshwa now sent Pándurang Pandit to levy tribute from his share of Gujarát, and that officer crossing the Mahi marched upon Cambay. Momín Khán prepared to oppose him, but the Pandit made friendly overtures, and eventually Momín Khán not only paid the sum of Rupees 7000 for grass and grain for the Pandit's troops, but also lent him four small cannon. Pándurang Pandit then marched upon Áhmedábád, and encamping near the Kankaria Lake laid siege to the city which was defended by Jawán Mard Khán. During the siege Pándurang Pandit, sending some troops, ravaged Nikol, part of the lands of Áli Muhammad Khán Bahádur, the author of the Mirăt-i-Áhmedi. Meanwhile, as the operations against Áhmedábád made no progress, Pándurang Pandit made offers of peace. These Jawán Mard Khán accepted, and on receiving from Jawán Mard Khán the present of a mare and a small sum of money under the name of entertainment, the Marátha leader withdrew to Sorath.

Marátha invasion. About this time the Peshwa released Dámáji Gáikwár on his promise to help the Peshwa's brother Raghunáthráv, who was shortly afterwards despatched with an army to complete the conquest of Gujarát. Meanwhile, Jawán Mard Khán's anxiety regarding the Maráthás was for a time removed by the departure of Pándurang Pandit. And, as the harvest season had arrived, he with his brother Zoráwar Khán Bábi, leaving Muhammad Mubáriz Sherwáni behind as his deputy, set out from Áhmedábád to levy tribute from the chiefs of the Sabarkantha. Certain well informed persons, who had heard of Raghunáthráv's preparations for invading Gujarát, begged Jawán Mard Khán not to leave the city but to depute his brother Zoráwar Khán Bábi to collect the tribute. Jawán Mard Khán, not believing their reports, said that he would not go more than from forty-five to sixty miles from the city, and that, should the necessity of any more distant excursion arise, he would entrust it to his brother. Jawán Mard Khán then marched from the city, levying tribute until he arrived on the Pálanpur frontier about seventy-five miles north of Áhmedábád. Here meeting Muhammad Bahádur Jhálori, the governor of Palanpur, Jawán Mard Khán was foolishly induced to join him in plundering the fertile districts of Sirohi, till at last he was not less than 150 miles from his headquarters. Meanwhile, Raghunáthráv, joining Dámáji Gáikwár, entered suddenly by an unusual route into Gujarát, and news reached Áhmedábád that the Maráthás had crossed the Narmada River. On this the townspeople sent messenger after messenger to recall Jawán Mard Khán, and building up the gateways prepared for defence, while the inhabitants of the suburbs, leaving their houses, crowded with their families into the city for protection. Raghunáthráv, hearing that Jawán Mard Khán and his army were absent from the city, pressed on by forced marches, and crossing the Mahi River despatched an advance corps under Vithal Sukhdev. Kosáji, proprietor of Nadiad, at Dámáji Gáikwár's invitation also marched towards Áhmedábád, plundering Mehmúdábád Khokhri, only three miles from the city. In the meantime Vithal Sukhdev reached Kaira (Kheda), and taking with him the chief man of that place, Muhammad Daurán, son of Muhammad Bábi, continued his march. He was shortly joined by Raghunáthráv, and the combined forces now proceeded to Áhmedábád and encamped by the Kánkaria lake.

Next day Raghunáthráv moved his camp to near the tomb of Sháh Bhíkan, on the bank of the Sabarmati River to the south-west of the city. Raghunáthráv now proceeded to invest the city, distributing his thirty to forty thousand horse into three divisions. The operations against the north of the city were entrusted to Dámáji Gáikwár; those on the east to Gopál Hari; while the troops on the south and west were under the personal command of Raghunáthráv and his officers.