In 1683, Queen Maria Francisca died. In the court there was a strong «French party», headed by the Duke of Cadaval, the then Count of Vila Maior and by the Viscount of Ponte de Lima, but others favored a closer alliance with Spain. By marrying again, Peter II chose the sister of the Queen of Spain, daughter of Philipp Wilhelm, Elector Palatine. The new queen, Maria Sophia of Neuburg, never influenced political life, maintaining a low profile. The couple had eight children, including the younger John, who succeeded his father in 1706 as King John V of Portugal.