Pandi is the youngest tow in Bulacan. During the Spanish days it formed part of the vast Santa Maria de Pandi Estate, which included the towns of Santa Maria and Balagtas and parts of Angat and Bustos. The present site of the Municipal building was then enclosed with high and massive walls similar to the famous Walls of Intramuros, which served as the center of power and activities of the Spanish friars who owned and administered the haciendas. Politically, however, Pandi was then a part of the town Balagtas (then Bigaa0 until its formal separation and independence on April 17, 1946.

During the Philippine Revolution, Pandi played a vital and historical role in the fight for Philippine Independence. It was in Kakarong de Sili, which about 6,000 Katipuneros from various towns of Bulacan headed by General Eusebio Roque, better known as "Maestrong Sebio" that the "Kakarong Republic" was organized shortly after the cry of Balintawak. History and researchers, as well as records of the National Historical Commission, tell that the "Kakarong Republic" was the first and truly organized Revolutionary Government established in the country to overthrow the Spaniards antedating event the famous "Malolos" and the "Biak-na-Bato Republic". In recognition thereof, these three 'republics" established in Bulacan have been incorporated in the seal of the province of Bulacan.

According to available records including the biography of General Gregorio del Pilar entitled "Life and Death of a Boy General" written by Teodoro Kalaw, former director of the National Library, a fort was constructed at Kakarong de Sili that was like a miniature city. It had streets, an independent police force, a musical band, a factory of falconets, bolos and repair shops for rifles and cartridges. The "Kakarong Republic" had a complete set of officials with Canuto Villanueva as Supreme Chief and "Maestrong Sebio" as Captain-General of the Army. The fort was attacked and totally destroyed on January 1, 1897 by a large Spanish force headed by General Olaguer-Feliu. Gen. Del Pilar was only a lieutenant at that time and the Battle of Kakarong de Sili was his first "baptism of fire".

The actual site of the "Battle of Kakarong de Sili" is now a part of the Barangay of Real de Kakarong where the Kakarong Lodge No. 168 of the Legionarios del Trabajo in memory of the 1,200 Katipuneros who perished in the battle erected a monument of the "Inang Pilipina" in 1924. No less than one of the greatest generals in the Philippines history, General Emilio Aguinaldo, visited this sacred ground in the late fifties.