Joao de Braganza was the son of Pedro II of Portugal and Maria Sophia of Neuburg. He was born in Ribeira Palace in the Portuguese capital of Lisbon in 1689, raised into the wealthy House of Braganza, the rulers of Portugal as the "Brigantine Dynasty". Joao V succeeded his father upon his death in 1706 and married Maria Anna of Austria in 1708 at the age of 19, consolidating an alliance between the Austrian Empire and Portugal against France and Spain during the War of the Spanish Succession (1700-1714).
Due to his trade income influx from Brazil and the Yucatan Peninsula of Mexico, Joao V became one of the richest monarchs of Europe and entertained a lavish court, becoming known as "the Portuguese Sun King". Joao V's policies of daily worship and donations to the Papal States gave him the title of "Most Faithful Majesty" by Pope Benedict XIV, although his claims that his policies came above the Church at times put him against the Papacy. During his reign, Portugal's riches grew, although his trade fleet was attacked off Belize by the legendary pirate Bartholomew Roberts in 1719, and several of his ships were sunk off the coast of Principe (present-day Sao Tome and Principe islands) off the coast of mainland Africa. Piracy was a major problem at the time, and Principe was taken over by pirates after an assault by Edward Kenway. Joao died in 1750, and his son Jose I of Portugal succeeded him.