As war with the British Empire threatened, Brazil had to turn its attention to its southern frontiers.
Another civil war had begun in Uruguay as its political parties turned against each other.
The internal conflict led to the murder of Brazilians and looting of their property in Uruguay.
Brazil's government decided to intervene, fearful of giving any impression of weakness in the face of conflict with the British.
A Brazilian army invaded Uruguay in December 1864, beginning the brief Uruguayan War, which ended in February 1865.
Meanwhile, the dictator of Paraguay, Francisco Solano López, took advantage of the situation to establish his country as a regional power.
The Paraguayan army invaded the Brazilian province of Mato Grosso (the area known after 1977 as the state of Mato Grosso do Sul), triggering the Paraguayan War.
Four months later, Paraguayan troops invaded Argentine territory as a prelude to an attack on Rio Grande do Sul.

Aware of the anarchy in Rio Grande do Sul and the incapacity and incompetence of its military chiefs to resist the Paraguayan army, Pedro II decided to go to the front in person.
Upon receiving objections from the cabinet, the General Assembly and the Council of State, Pedro II pronounced: "If they can prevent me from going as an Emperor, they cannot prevent me from abdicating and going as a Fatherland Volunteer"—an allusion to those Brazilians who volunteered to go to war and became known throughout the nation as the "Fatherland Volunteers".
The monarch himself was popularly called the "Number-one volunteer".
Given permission to leave, Pedro II disembarked in Rio Grande do Sul in July and proceeded from there by land.
He travelled overland by horse and wagon, sleeping at night in a campaign tent.
In September, Pedro II arrived in Uruguaiana, a Brazilian town occupied by a besieged Paraguayan army.

The Emperor rode within rifle-shot of Uruguaiana, but the Paraguayans did not attack him.
To avoid further bloodshed, he offered terms of surrender to the Paraguayan commander, who accepted.
Pedro II's coordination of the military operations and his personal example played a decisive role in successfully repulsing the Paraguayan invasion of Brazilian territory.
Before returning to Rio de Janeiro, he received the British diplomatic envoy Edward Thornton, who apologized on behalf of Queen Victoria and the British Government for the crisis between the empires.
The Emperor regarded this diplomatic victory over the most powerful nation of the world as sufficient and renewed friendly relations.
As war with the British Empire threatened, Brazil had to turn its attention to its southern frontiers. Another civil war had begun in Uruguay as its political parties turned against each other. The internal conflict led to the murder of Brazilians and looting of their property in Uruguay. Brazil's government decided to intervene, fearful of giving any impression of weakness in the face of conflict with the British. A Brazilian army invaded Uruguay in December 1864, beginning the brief Uruguayan War, which ended in February 1865. Meanwhile, the dictator of Paraguay, Francisco Solano López, took advantage of the situation to establish his country as a regional power. The Paraguayan army invaded the Brazilian province of Mato Grosso (the area known after 1977 as the state of Mato Grosso do Sul), triggering the Paraguayan War. Four months later, Paraguayan troops invaded Argentine territory as a prelude to an attack on Rio Grande do Sul.
Aware of the anarchy in Rio Grande do Sul and the incapacity and incompetence of its military chiefs to resist the Paraguayan army, Pedro II decided to go to the front in person. Upon receiving objections from the cabinet, the General Assembly and the Council of State, Pedro II pronounced: "If they can prevent me from going as an Emperor, they cannot prevent me from abdicating and going as a Fatherland Volunteer"—an allusion to those Brazilians who volunteered to go to war and became known throughout the nation as the "Fatherland Volunteers". The monarch himself was popularly called the "Number-one volunteer". Given permission to leave, Pedro II disembarked in Rio Grande do Sul in July and proceeded from there by land. He travelled overland by horse and wagon, sleeping at night in a campaign tent. In September, Pedro II arrived in Uruguaiana, a Brazilian town occupied by a besieged Paraguayan army.
The Emperor rode within rifle-shot of Uruguaiana, but the Paraguayans did not attack him. To avoid further bloodshed, he offered terms of surrender to the Paraguayan commander, who accepted. Pedro II's coordination of the military operations and his personal example played a decisive role in successfully repulsing the Paraguayan invasion of Brazilian territory. Before returning to Rio de Janeiro, he received the British diplomatic envoy Edward Thornton, who apologized on behalf of Queen Victoria and the British Government for the crisis between the empires. The Emperor regarded this diplomatic victory over the most powerful nation of the world as sufficient and renewed friendly relations.
Pedro II of Brazil