In 1806, a British expeditionary force invaded Buenos Aires. A 13-year-old Rosas served distributing ammunition to troops in a force organised by Viceroy Santiago Liniers to counter the invasion. The British were defeated in August 1806, but returned a year later. Rosas was then assigned to the "Caballería de los Migueletes" (a militia cavalry), although he was probably barred from active duty during this time due to illness.