Joseph I, (born July 26, 1678, Vienna, Austria—died April 17, 1711, Vienna), Holy Roman emperor from 1705, who unsuccessfully fought to retain the Spanish crown for the House of Habsburg. The eldest son of the emperor Leopold I, Joseph became king of Hungary in 1687 and king of the Romans, the imperial successor-designate, in 1690. When Charles II, the last Spanish Habsburg, died in 1700, Joseph supported the candidacy of his own younger brother Charles (the future emperor Charles VI) against the French king Louis XIV’s grandson Philip (later Philip V of Spain).