In the 1820s, the Dutch was yet to consolidate its possessions in some parts of Dutch East Indies (later Indonesia) after re-acquiring it from the British. At the same time, a conflict broke out in West Sumatra between the so called adat and padri factions. Although both Minangkabaus and Muslims, they differ in values: the Adats were Minangkabau traditionalists while the Padris were Islamist-reformists. The Padris sought to reform un-Islamic traditions, such as cockfighting and gambling.
Feeling threatened, the Adats sought help from the Dutch. Between 1821-1824, skirmishes broke throughout the region, ended only by the Masang Treaty. The war cooled down during the next six years, as the Dutch faced a bigger-scale uprisings in Java (The Java War).
The conflict broke out again in 1830s with the Dutch gaining early victories. Soon after, the war centered on Bonjol, the fortified last stronghold of the Padris. It finally fell in 1837 after being besieged for three years, and along with the exile of Padri leader Tuanku Imam Bonjol, the conflict died out.
With the victory, the Dutch tightens its hold on West Sumatra. Yet there was a positive legacy for the native Minangs: after the war, the tribal and religious leaders increasingly reconciled their visions. This helped promulgating the new view of "adat basandi syara', syara' basandi Kitabullah" (tradition founded upon Islamic law, Islamic law founded upon the Quran).