The "illegitimate child" theories may have had their origins in the writings of pro-liberal propagandists or royalists who wanted to denigrate the queen and undermine the claims of Miguel and of his descendants to the Portuguese throne. What is clear is that Miguel was the queen's favourite child. After the death of her firstborn, it was Miguel who received most of her attention, rather than Pedro, who was closer to his father. In 1807, at the age of 5, Miguel accompanied the Portuguese Royal Family on their transfer to Brazil in order to escape from the first Napoleonic invasion of Portugal; he returned in 1821 with João VI and his mother, while his brother Peter remained behind as regent of Brazil. Miguel was a mischievous child, sometimes seen in the miniature uniform of a general. At sixteen he was seen galloping around Mata-Carvalos, knocking off the hats of passers-by with his riding crop. He spent most of his time with a rowdy band of half-caste or Indian farm-hands. In general, Miguel was spoiled by the queen and her royal household, and clearly influenced by the base tendencies of others. The Duke of Palmela described him as:  Miguel was an avowed conservative and admirer of Prince Metternich, who had referred to the liberal revolutions in the 1820s as unrealistic and without any historical roots:  Miguel was 20 years old when he first challenged the liberal institutions established after the 1820 revolution, which may have been part of a wider strategy by the queen. He was at the head of the counter-revolution of 1823, known as the Vilafrancada, which erupted on May 27, 1823 in Vila Franca de Xira. Early in the day, Miguel joined the 23rd Infantry Regiment, commanded by Brigadier Ferreira Sampaio (later Viscount of Santa Mónica) in Vila Franca, where he declared his support for an absolutist monarchy. He immediately called on General Pampluna (later Marquis of Subserra) to join him and his cause. The general, not a fan of the liberal constitution, obeyed his summons and within five days he controlled the insurrectionary forces. The prince, supported by the queen, went so far as to demand the abdication of the king, who, faithful to his earlier oath, wanted to maintain the 1822 Constitution, despite the growing support for absolutist forces in Vila Franca.