Sarmiento was eventually elected governor in 1862, pursuing sorely needed public investments and enacting Argentina's first law mandating compulsory education (at that time about 80% of the adult population lacked any form of education).