In 1655, Mariana of Austria gives birth to Maria Ambrosia, fathered by King Phillip IV of Spain. In OTL, she dies in her first year, but in ATL, she survives childhood, growing up to become the elder sister of King Carlos II "El Hechizado" of Spain.
She cares for her mentally and physically ill brother throughout her life, shunning her father's desires for her to marry her Austrian cousin, and eventually marrying a Spanish general. Shortly after their marriage, however, the general dies, and she becomes a reclusive widow. It is during this time that she first travels to England, meeting King William III and his Queen, Mary II. Rumours of William and Maria becoming very close persist for many years, until Mary's death.
After Mary's death, Maria and William marry, in the midst of great uproar and fury from both William's advisors and parliament, and Maria's Habsburg family - all but her brother, Carlos II, by now King of Spain. Maria becomes Queen-Consort of William's territories, and in their first year of marraige, they have a son together, whom they call George Carlos Stuart.
Upon King Carlos II of Spain's death, it is revealed that he has left the throne of his empire to his sister - Maria. William, who had previously been content to let Austria and France decide the fate of Spain, now decided to take Great Britain to war over the issue, fighting for his wife's rights to the throne, against France's Philip, duc d'Anjou, and Austria's Leopold I. Initially not taken as a serious contender, William poured vast resources into the fight, taking both France and Austria off-guard. Eventually, peace was settled, with parts of the Spanish Empire being annexed to both Austria and France, but the majority being ruled by Maria I, with William as King-Consort.
In 1730, William III dies, aged 79. His son George, aged 33, is the clear successor, becoming George I of Great Britain and Ireland. Maria dies just five years later, leaving her throne to her son also. George I unites the throne of Spain with that of Great Britain and Ireland, creating the first Anglo-Spanish Empire. For a time, France under Louis XV gestures war over the uniting of the thrones, but finds no backing from Austria under Charles VI, who is busy both with colonies in the New World and with trying to hold together a fracturing Holy Roman Empire, and soon backs down, prefering instead to use subterfuge to try and ignite religious tension in the newly united Empire.