The presidency of France was first publicly proposed during the July Revolution of 1830, when it was offered to the Marquis de Lafayette. He demurred in favour of Prince Louis Phillipe, who became King of the French. Eighteen years later, during the opening phases of the Second Republic, the title was created for a popularly elected head of state, the first of whom was Louis-Napoléon Bonaparte, nephew of Emperor Napoleon. Bonaparte served in that role until he staged an auto coup against the republic, proclaiming himself Napoleon III, Emperor of the French.