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.