The Army That Turned at Ujjain
Nagabhata I, the Pratihara founder who stopped the Arab raids into Malwa, 720s to 730s
Around 725 the Arab governor of Sindh sent his columns east as far as Ujjain, and the Arab chronicle then goes quiet. This lesson reads that chronicle beside a stone at Gwalior that names the king who broke the foreign army: Nagabhata I, founder of the Pratiharas, the family of doorkeepers.
Smoke over Baharimad

It is around the year 725. On the lower Indus, the river the Arab writers call the Mihran, a new governor of Sindh is at work. His name is al-Junayd ibn Abd al-Rahman al-Murri, and he serves the Umayyad caliph Hisham in Damascus. He has already fought a battle from ships on a lake. He has broken the walls of a town called Kiraj with battering rams. Now he looks east.
He sends his officers out in columns. One force rides against Uzain, which is Ujjain, the old city of Avanti on the Shipra river, about 900 kilometres east of the port of Debal. A second, under a commander named Habib ibn Murra, goes against the country of Maliba, which most historians read as Malwa. The raiders strike around Ujjain. They attack a place called Baharimad and burn its suburbs. Junayd takes Bhinmal and the Gurjara country, and the loot is counted in the tens of millions.
We know this because a scholar in Baghdad, al-Baladhuri, wrote it down more than a century later in his Futuh al-Buldan, "The Conquests of the Lands". His list of Junayd's targets reads like a march across Rajasthan, Gujarat and Malwa. Then, at Ujjain, the list goes quiet. He records raids on Uzain. He never records that Uzain fell.
A few lines later he writes that under the next governor, the Arabs pulled back from "several parts of India". Something turned that army around. The Arab book does not say what. For the answer you have to go to a lake outside Gwalior and read a stone.
The Governor's List
Al-Baladhuri was not an eyewitness. He collected older reports and wrote them up in Baghdad, around the 860s. His account of Junayd is short, but it is the oldest one we have.