France was ruled by a series of monarchs from 497 AD to 1793. Louis XIV established absolute rule and moved the royal court to Versailles in 1682, setting French culture as preeminent in Europe. Growing discontent among the peasant and middle classes led to the French Revolution in 1789. The storming of the Bastille prison sparked mass revolution across France, ushering in a Reign of Terror and the rise of Napoleon Bonaparte, who established the French Empire before his eventual defeat in 1815.