Ragamuffin rebels capture Porto Alegre, then capital of the Brazilian imperial province of Rio Grande do Sul, triggering the start of ten-year-long Ragamuffin War.

The Ragamuffin War (Portuguese: Guerra dos Farrapos or Revoluo Farroupilha) was a Republican uprising that began in southern Brazil, in the province (current state) of Rio Grande do Sul in 1835. The rebels were led by generals Bento Gonalves da Silva and Antnio de Sousa Neto with the support of the Italian fighter Giuseppe Garibaldi. The war ended with an agreement between the two sides known as Green Poncho Treaty (Portuguese: Tratado de Poncho Verde) in 1845.

Over time, the revolution acquired a separatist character and influenced separatist movements throughout the entire country such as the Liberal Rebellions in So Paulo, Rio de Janeiro, and Minas Gerais in 1842, and the Sabinada in Bahia in 1837.

It was inspired by the recently ended Cisplatine War, maintaining connections with both Uruguayan leaders as well as independent Argentine provinces such as Corrientes and Santa Fe. It even expanded to the Brazilian coast, in Laguna, with the proclamation of the Juliana Republic and to the Santa Catarina plateau of Lages.

The abolition of slavery was one of the demands of the Farrapos movement. Many slaves organized troops during the Ragamuffin War, the most famous of which is the Black Lancers Troop, annihilated in a surprise attack in 1844 known as Battle of Porongos.

Porto Alegre (UK: , US: , Brazilian Portuguese: [ˈpoɾtu aˈlɛɡɾi] (listen); lit. '"Joyful Harbor"') is the capital and largest city of the Brazilian state of Rio Grande do Sul. Its population of 1,488,252 inhabitants (2020) makes it the twelfth most populous city in the country and the center of Brazil's fifth largest metropolitan area, with 4,405,760 inhabitants (2010). The city is the southernmost capital city of a Brazilian state.Porto Alegre was founded in 1769 by Manuel Jorge Gomes de Sepúlveda, who used the pseudonym José Marcelino de Figueiredo to hide his identity; but the official date is 1772 with the act signed by immigrants from the Azores, Portugal.

The city lies on the eastern bank of the Guaíba Lake, where five rivers converge to form the Lagoa dos Patos, a giant freshwater lagoon navigable by even the largest of ships. This five-river junction has become an important alluvial port as well as a chief industrial and commercial center of Brazil.

In recent years, Porto Alegre hosted the World Social Forum, an initiative of several non-government organizations. The city became famous for being the first city that implemented participatory budgeting. The 9th Assembly of the World Council of Churches was held in Porto Alegre in 2006. Since 2000, Porto Alegre also hosts one of the world's largest free software events, called FISL.

The city was one of the host cities of the 2014 FIFA World Cup, having previously been a venue for the 1950 FIFA World Cup.

In the middle of 2010s, Porto Alegre had a growing wave of violence, being ranked as 39th among the world's 50 most violent cities in 2017. Nevertheless, the number of violent crimes has been dropping steadily since 2018.