 O'Higgins's opponents also disapproved of his diversion of Chilean resources to aid San Martín's liberation of Peru.O'Higgins insisted on supporting that campaign because he realized that Chilean independence would not be secure until the Spaniards were routed from the Andean core of the empire.However, amid mounting discontent, troops from the northern and southern provinces forced O'Higgins to resign.