 However, when the fortress was taken by Spanish troops, many families fled to Viamão and established around its port the city of Porto Alegre.During the Ragamuffin War, Rio Grande became a city and the province's capital all at once.In 1835, revolutionary General Bento Gonçalves da Silva forced Antônio Rodrigues Fernandes Braga, the provincial president, to flee from Porto Alegre to Rio Grande, a journey of about 200 km.