had two children after the attempted conspiracy of Carlota (Maria da Assunção, born in 1805, and Ana de Jesus Maria, born in 1806), although there are suspicions about the possibility of the four children of the couple born after 1801, including the 1802-born Miguel, were not children of João but of one or several of the lovers of Carlota Joaquina). Riots of Saint Torcato (1805) The riots of Saint Torcato was a popular uprising in the Portuguese country side with a strong mixture of religious influence and zealotry. Peninsular War (1807–14) First invasion During the Napoleonic Wars, Portugal was, for a time, Britain's only ally on the continent. Throughout the war, Portugal maintained a military of about 200–250 thousand troops worldwide. In 1807, after the Portuguese government's refusal to participate in the Continental System, French troops under General Junot invaded Portugal, taking Lisbon. However, a popular revolt against Junot's government broke out in the summer of 1808 and Portuguese irregulars took up arms against the French. This enabled a British army under Arthur Wellesley to be landed in Portugal where, aided by Portuguese troops, they defeated Junot at the Battle of Vimeiro; this first French invasion was ended by the Convention of Sintra negotiated by his superiors, which allowed Junot's men to withdraw unmolested with their plunder. Meanwhile, the general revolt against the French in Spain led to the landing of Sir John Moore in the north of that country, forcing Napoleon himself to lead an army into the Peninsula. Though Moore was killed, the British managed to extricate themselves from the Peninsula in the Battle of La Coruña. Portugal itself, however, remained independent of the French, and Napoleon left things in the Iberian Peninsula in the hands of Marshal Soult. Second and third invasions Soult proceeded to invade Portugal in the north. However, the Portuguese held on, giving the British the impetus to send Wellesley back with additional regiments of troops to help recover the Iberian peninsula. Wellesley, aided by the remaining Portuguese regiments hastily scraped together, liberated Portugal. A third invasion took place, led by Marshal André Masséna. The Anglo-Portuguese Army managed to halt the French advance at the fortifications of Torres Vedras and successfully defeat Masséna's troops, and slowly recovered the Iberian peninsula. Wellesley was made Duke of Wellington in recognition of his services. The Portuguese army was put under the command of Marshal Beresford and was