One could be forgiven for thinking that a liberal revolt in Portugal would begin in Lisbon. After all it had lost its status as capital to Rio de Janeiro and, being the seat of regency, bore the brunt of William Beresford's unwelcome presence. And indeed the city itself was primed and ready to resist. However Beresford's personal presence meant that conspiracies were much more difficult to organize in Lisbon, meaning that, at least in 1820, the primary uprising occured in Porto.
Revolutionary sentiment had been building in Porto for some time by 1820. Porto had been hit hard by Beresford's favoritism towards British interests, leaving her merchants out competed by ships from London and Liverpool. Porto had also suffered from Joao's opening of Brazil to non-Portugesse trade, the end of the colonial pact. As such the city was open to a revolt. It was not, as both opponents and later admirers would try and portray it, republican in sentiment. The conspirators behind the Porto Junta, as the rebellion would eventually be called, primarily sought a constitutional form of government with a Cortes ruling beside the King. In addition they saught the return of the Court to Lisbon and a restoration of Brazil to her "proper" colonial status.
These to final two goals of the Portuguese Liberals killed any hope of collaboration in the long term with those in Brazil. Although the arrival of the Court to Brazil had brought benefits to Brazil, not everyone was satisfied. Some resented the continued disproportionate power of Portugesse born officials, others were slaves who, understandably, desired freedom, still others saught constitutional government in the same vein as the Portugesse Liberals, only they wanted the Cortes to sit in Rio de Janeiro instead of Lisbon. In 1817 a group of such men had launched a revolt in the north, with the aim of establishing a truly Brazillian republic. Needless to say this failed utterly, but it does demonstrate that Brazil was not lockstep behind the absolutist views of Joao VI.
The revolutionaries found themselves isolated and without rural support
5th Dimensionalists[1] may speculate on what might have happened if the various liberals in the United Kingdom had managed to unite behind a common platform. But our narrative does not turn in this fashion and instead the liberals of Brazil stood firmly separate from those of Portugal.
William Beresford had long suspected that Porto would cause him trouble, and so he little trouble being convinced when word came of a plot against him in the city. Combined with his ongoing awareness of how events in Spain were spiraling out of control this caused him to begin preparations of loyal troops to quash any uprising. This naturally led to the conspirators panicking about being discovered and a few jumpy soldiers involved mutnieyed faster then expected, forcing the rest of the liberals to move the date forward. On August 10, 1820[2] Porto was seized by a coalition of disatisifed bugeouises, who proclaimed the Provisional Committee of the Supreme Government of the King, the titutuler Junta of the Porto Junta. The Junta expected, not entirely unreasonably, to receive support from across the country[3]. Unfortunately for them, by the time the rest of tbe country had heard of the rebellion in the north Beresford was marching at the head of a royalist force to retake Porto. He was not so foolish as to leave other areas of unrest unguarded and indeed was successful in capturing many liberal leaders. As for the rural peasantry, there was indeed significant opposition to a Briton marching on Porto, but they had no love lost for the liberals especially as rumors spread that they were in fact French Republicans. So, as Beresford approached Porto on the 19th, the Porto Junta found themselves not a national group of revolutionaries, but a local group of rabble rousers holed up in their own city.
Despite this, the Junta perhaps had reason to hope. Beresford had cast his lot in favor of a direct attack on Porto, which could come back to bite him. If his assault was repulsed, other cities might rise as well, spreading his forces thin. The Junta also had the theoretical advantage of geography. Between Porto and Beresford flowed the Rio Bouro, a barrier against the advancing army. The sailors of Porto were sympathetic to the Junta's complaints and seized the ships and boats in the town, including British vessels for fear of then allying with their countrymen. Such action would probably have provoked an international incident, had it not been for subsequent events.
The Battle of the Rio Bouro
With a navel action out of the cards Beresford was forced to look towards the bridges into Porto as a possible route in. Plans were put in place to blow the bridges to kingdom come, yet plans were also made to keep the bridges and defeat Beresford on the south bank. The Junta was divided on what to do. A decisive victory could inspire rebellion elsewhere, and some reasoned that eventually Berseford would just summon the Royal Navy (either British of Portuguese) and so total control over the river was needed. Others argued that the benefits of the barrier the river formed were too great to be surrendered and believed that simply delaying Berseford would inspire others to form Juntas. In the end this infighting only ruined the Junta's chances, a small force sent south was easily swept aside by Berseford and, crucially, he managed to seize a bridge before the gunpowder meant to destroy it could be lit. This was the killing blow, as loyalist troops poured across the bridge, and Junta forces were caught off guard. Fighting lasted a few days, with a few desperate soldiers who faced execution for desertion holding out in a church until the end of the month, but by and large the rebellion was crushed by August 24th.
Naturally when word of the rebellions defeat reached Rio de Janeiro Joao confirmed all of Beresford's requests, leaving him de fact regent of Portugal. The raised some eyebrows among the Brazillian liberals who distrusted foreigners meddling in the royal government, but for now they accepted the settlement, glad that Brazil remained the seat of power.
The Junta conspirators were either captured and executed, captured and imprisoned (by far the most numerous group), or fled. This latter group typically fled to liberal areas in Spain. The Spanish liberals were not eager to anger their neighbors in the midst of their own crisises, but at the same time were unwilling to condemn fellow revolutionaries to the arbitrary hand of Beresford. So the Portuguese exiles milled about awkwardly, hoping for an opportunity to strike. This ironically turned some of the apolitical populace of Portugal against them, as instead of becoming martyred they were perceived as puppets of Spain, the arch-enemy of Portugal.
And so it was that the absolutists held their ground against the Portuguese liberals. They would find the Brazilian ones a much more formidable opponent.
__________
1: Alternate Historians
2: 2 weeks earlier then OTL
3: As they did OTL, in the absence of Beresford