The liberal regime established in Portugal by the Liberal Revolution of 1820 did not enjoy the confidence of more traditional elements of society, which demanded the return of absolutism. At the head of this tendency stood Queen Carlota Joaquina, wife of João VI of Portugal, who had been exiled to Queluz after refusing to swear allegiance to the Constitution of 1822 and her third son, Prince Miguel.
The year 1823 gave the absolutists the opportunity they sought to end the liberal regime in Portugal. In that year the Holy Alliance authorised a French invasion of Spain to bring down the liberal government in Madrid and restore Fernando VII of Spain. This encouraged an absolutist uprising by the count of Amarante in the north of Portugal and led the party of the Queen to open revolt, confident of French support. On 23 May Prince Miguel went to Vila Franca where he was joined by the 23rd Regiment of Infantry that had been sent to Almeida to reinforce the frontier town against being taken by the rebels.
With the Queen and Prince Miguel prepared to force him to abdicate if necessary, João VI eventually decided to take command of the revolt himself, encouraged by the rising of the 18th Infantry Regiment which presented itself at Bemposta Palace to acclaim him as absolute ruler. He left for Vika Franca, obliged Prince Miguel to submit, and returned to Lisbon in triumph.
The Cortes disbanded and various liberal politicians went into exile as the absolutist regime was restored. The King managed to prevent the ultra-reactionary faction from coming to power, but the Queen's party continued its intrigues, and less than a year later a new absolutist rebellion broke out, the April Revolt, which ended with Prince Miguel going into exile.
On 27 May 1823, at the beginning of the uprising, Prince Miguel issued the following proclamation from Vila Franca:
To commemorate the uprising a "Medal of Loyalty to King and Country" was instituted, humorously referred to by Liberals as the "medal of dust." The medal was intended to honour those who had joined João VI at Vila Franca or Prince Miguel At Santarém, or who had joined the forces of Manuel da Silveira Pinto da Fonseca Teixeira, Count of Amarante, later made marquês de Chaves.