In 1698, Charles fell seriously ill and his death seemed imminent. On 11 October, Britain, France and the Dutch Republic signed the Treaty of the Hague or First Partition Treaty, an attempt to impose a solution to the Succession issue on Spain and Austria. Six year old Joseph Ferdinand of Bavaria, was made heir to the bulk of the Spanish Empire, the rest split between France and Austria. His parents were Charles's niece Maria Antonia and Maximilian of Bavaria, a Wittelsbach like Maria Anna.