In 1926, after several years of the Mexican Revolution and insecurity, President Plutarco Elías Calles, leader of the ruling National Revolutionary Party, enacted the Calles Law, which eradicated all the personal property of the churches, closed churches that were not registered with the State, and prohibited clerics from holding a public office. The law was unpopular; and several protesters from rural areas, fought against federal troops in what became known as the Cristero War. After the war's end in 1929, President Emilio Portes Gil upheld a previous truce where the law would remain enacted, but not enforced, in exchange for the hostilities to end.