the ill-fated british invasions of the río de la plata set a precedent in weakening the monarchic authority. the viceroy rafael de sobremonte fled to córdoba during the conflict, but could not return to buenos aires after the liberation: an open cabildo gave santiago de liniers (who led the spanish forces in the conflict) the military authority over the city, while it prepared for a british counter-attack, and ordered sobremonte to stay out. liniers would be appointed viceroy later, and this appointment would be confirmed by the spanish king afterwards. this was the first time that the viceroy was deposed by local institutions, and not by the spanish king himself.