Most armies in 17th-century South Asia — Mughal, Bijapur, Portuguese, British East India Company — operated with a basic assumption about the relationship between soldiers and civilian populations: soldiers were dangerous to civilians, and civilians in contested territory should expect to be treated as resources to be exploited or obstacles to be removed. This was not a policy failure; it was the operational norm.
Shivaji established a military code of conduct that inverted this norm and enforced it with the death penalty. The code was not aspirational ethics — it was state policy, operational from the beginning of the Maratha campaigns and consistently enforced across decades. Its value was not primarily military but political: an army that behaved differently in civilian territory generated a different kind of relationship with that territory than any army the populations had previously experienced.
The most powerful corroboration is not from Purandare's account but from a hostile source: Khafi Khan, a Mughal historian writing from the imperial court's perspective and with no interest in celebrating Shivaji, confirms that Shivaji's "injunctions upon this point were very strict." An enemy's acknowledgment of a virtue is stronger evidence than a friend's praise.
Chapter 11 of Purandare's account documents the explicit provisions of the military code that Shivaji established:1
The distinction between personal virtue (a ruler who happens to be decent) and state doctrine (a policy enforced through the institutional apparatus regardless of individual character) matters because state doctrine survives personnel changes. Purandare's account presents the code as official policy — it was promulgated, known by soldiers, and enforced through the same military justice apparatus that executed the Ranjhe village rapist.
The code did not depend on soldiers being virtuous individuals; it depended on soldiers knowing that violations would be punished by death. The mechanism of enforcement was not moral formation but institutional consequence — which is why it could function at scale across an army of thousands, not just with a small group of personally loyal men.1
This is the critical distinction from most narratives of "good army" behavior in pre-modern history: personal virtue is charismatic and person-dependent; institutional enforcement is scalable and persistent.
The political return on the code of conduct is documentable through its effects, not just its existence. Maratha intelligence networks operated in Deccan territory with the cooperation of local populations — farmers who provided information, gave shelter, guided routes, and did not report Maratha force movements to Mughal or Bijapur agents. This cooperation required trust. The code of conduct was the basis of that trust: an army that paid for its provisions, did not take women or children, and executed soldiers who violated these rules was an army that local populations had reason to tolerate, and eventually to support.1
The contrast was visible enough that Khafi Khan — who had no reason to praise it — documented it. The Mughal armies operating in the Deccan did not behave this way; Bijapur forces did not behave this way; the Portuguese and British EIC did not behave this way. The Maratha code was exceptional enough to be remarked upon by a hostile observer.
The importance of Khafi Khan as a source cannot be overstated. Khafi Khan was a Mughal court historian writing after Shivaji's death with full awareness of the political implications of what he was documenting. A Mughal court historian crediting a Hindu rebel with strict discipline over his soldiers' treatment of Muslim and non-Muslim civilians was making a significant admission — one he had no incentive to make falsely and every incentive to omit if he could do so honestly.
His corroboration transforms the code of conduct from a Marathi-tradition hagiographic claim into a cross-source documented reality. The Marathi sources say the code existed; the Mughal source confirms it was enforced.
[POPULAR SOURCE] with external corroboration — The code of conduct provisions are documented by Purandare [POPULAR SOURCE], but the Khafi Khan corroboration is a cross-source verification that elevates this above most Purandare claims. The Khafi Khan quote should be read in its primary source context (which Purandare does not fully cite) to assess the exact scope of what Khan was confirming.1
Tension with "take by purchase in enemy territory": The prohibition on taking provisions without payment in enemy territory creates an interesting economic problem: the army must carry sufficient currency or credit to pay for everything it needs while operating in enemy-held areas. This is a significant logistical constraint that most armies avoided by simply taking what they needed. How the Maratha army actually financed its in-the-field provisioning expenses in enemy territory is not documented in Purandare's account.
Tension with the chauth system: The chauth extracted one-fourth of enemy territory's revenue at military gunpoint. "Take only by purchase" for individual soldiers while the state was extracting 25% of the territory's revenue through military coercion is a distinction that worked at the political level (individual encounters vs. state-level extraction) but was materially contradictory.
Laine's counter-reading (multi-warrant pair, added 2026-06-12). The code's "no molesting of cows or Brahmins" and "no capture of women" sit inside the same Islamicate world Laine argues Shivaji barely changed. In The Islamicate World Shivaji Didn't Change he shows the Hindu-Muslim military and political collaboration ran on unbroken through Shivaji's own family — granddaughters married to Mughals, his son a Mughal mansabdar, his grandson raised in Aurangzeb's court — so the protect-cows-and-Brahmins doctrine reads less as a clean civilizational break than as one move inside a shared world. And in Kingdom, Not Nation Laine reads the Sivabharata's own plunder-catalogs (gold "purified" of its Muslim taint) as evidence that the operation was wealth-amassing kingship in the traditional sense, which complicates reading the code as a nation-builder's ethic. The hostile Khafi Khan corroboration of the code still stands as this cluster's strongest evidence; Laine does not dispute the code's existence, he reframes the world it operated in. Held side by side, not merged.
History — Just War Typology (Japanese Warrior Tradition): Just War Typology — Japanese Warrior Tradition — Naganuma Muneyoshi's four-element hierarchy (justice > technique > courage > knowledge) places justice first in the warrior's virtues, and his diagnostic of "eagerness to mobilize" as evidence of predatory rather than just warfare addresses the same question the Maratha code addresses: what distinguishes a legitimate military force from an armed gang? The Japanese just-war tradition solves this through character and justice; the Maratha code solves it through institutional enforcement. The parallel reveals a cross-cultural convergence: the political legitimacy of military force depends on its relationship to civilian populations, and both traditions independently identify the same variables (protection of civilians, restraint of soldiers, accountability for violations). The difference: Japan's samurai tradition relies on internalized character; Shivaji's code relies on structural enforcement. Character is more consistent; structure is more scalable.
History — Samurai Governance Philosophy: Samurai Governance Philosophy — Yamaga Soko's governance framework identifies "training and discipline" as the first structural governance competency. The Maratha military code is an extreme instantiation of this: training soldiers not just in technique but in behavioral constraints toward civilians, enforced through structural consequences rather than voluntary virtue. Soko's framework implies that governance quality flows from the character of those who govern; Shivaji's code implies that governance quality can be produced by institutional structure even from individuals who lack the requisite character. These are genuinely different theories of how good governance is produced.
The Sharpest Implication The Maratha code of conduct worked not because it made Maratha soldiers virtuous but because it made Maratha soldiers predictable. Civilians in contested territory don't need their occupiers to be virtuous; they need them to be predictable — to know what will happen when the army comes through, and to be able to plan accordingly. A predictable army that maintains rules is less threatening than an unpredictable army that may or may not be restrained on any given day, even if the predictable army is enforcing those rules through fear of execution rather than through genuine virtue. The implication: institutional reliability is more politically valuable than individual virtue in the relationship between military forces and civilian populations. The army that maintains its code consistently — even when violations would go unpunished because the army is passing through and won't return — is the army that generates civilian cooperation, which is more valuable than anything the army could extract by force.
Generative Questions
The code shows up as specific acts. The Civilian Evacuation Doctrine is the 1662 Sarjerao Jedhe letter ordering non-combatants moved out of the line of fire before an operation. Keshri Singh and the Prabalgad Clemency documents the treatment of an enemy commander's family — the "no capture of women or children" rule applied to a named case. And The Rout of the Bijapur Army at Pratapgad records graded pensions and calibrated punishment in the aftermath, where the code governed victory rather than restraint.