Maria Francisca of Savoy was twice queen consort of Portugal as the spouse of two Portuguese kings: Afonso VI and Peter II of Portugal. She first became queen of Portugal at the age of 20 on the day of her marriage to Afonso VI; because the marriage was never consummated, she was able to obtain an annulment. On 28 March 1668, she married Afonso's brother, the Infante Peter, Duke of Beja, who was appointed prince regent the same year due to Afonso's perceived incompetence. Maria Francisca became queen of Portugal for the second time when Peter succeeded his brother as Peter II in 1683 but died herself later that year.
In 1581, Portugal and Spain had been united under Philip II, but domestic opposition led to the 1640 to 1668 Portuguese Restoration War. By the end of 1665, Spanish attempts to reconquer Portugal had clearly failed, while their finances had collapsed, the Crown declaring bankruptcy no less than nine times between 1557 and 1666. This allowed Portuguese chief minister, Castelo Melhor, to focus on securing his own position. Afonso VI succeeded his father in 1653 but he was physically impaired and mentally unstable, with government controlled by his mother, Luisa de Guzmán. Guided by Castelo Melhor, Alfonso sent her to a convent in 1662, where she died in February 1666. The Portuguese government was split between pro-French and pro-English factions, respectively led by Castelo Melhor and Alfonso's younger brother, Pedro. In 1662, Charles II of England married Alfonso's sister Catherine; Castelo Melhor and Louis XIV saw a marriage between Maria Francisca and Alfonso as a way to offset that. Louis persuaded Charles to agree by providing him with the unpaid portion of Catherine's dowry; Maria arrived in Portugal on 2 August 1666 and the wedding took place the same day. From then on, she became known as Maria Francisca Isabel de Sabóia, although the marriage proved a disappointment. Alfonso abandoned the festivities early, leaving his new bride in charge, and reportedly displayed a similar lack of interest in consummating it. More importantly, Maria was an intelligent and resolute individual, who wanted to serve French interests but also rule; she soon discovered Alfonso was controlled by Castelo Melhor, who had no intention of sharing power. This drove her to first co-operate with her brother-in-law Pedro, then allegedly begin an affair with him. Although Castelo Melhor considered the marriage and the March 1667 Treaty of Lisbon with France as confirming his position, in fact they undermined it. Despite being financially exhausted, the treaty required Portugal to provide military support against Spain, while Maria persuaded Louis that Pedro was a better way to further French interests. In September, Castelo Melhor was forced into exile and in late November, Pedro deposed his brother, sending him to Terceira in the Azores. Maria retired to a convent and asked her marriage be annulled on the grounds of non-consummation; this was approved by her relative, French Cardinal Vendôme, and she married Pedro in September 1668.