Around AD 500, Paris was the capital of the Frankish king Clovis I, who commissioned the first cathedral and its first abbey dedicated to his contemporary, later patron saint of the city, Sainte Geneviève. On the death of Clovis, the Frankish kingdom was divided, and Paris became the capital of a much smaller sovereign state. By the time of the Carolingian dynasty (9th century), Paris was little more than a feudal county stronghold. The Counts of Paris gradually rose to prominence and eventually wielded greater power than the Kings of Francia occidentalis. Odo, Count of Paris was elected king in place of the incumbent Charles the Fat, namely for the fame he gained in his defence of Paris during the Viking siege (Siege of Paris (885-886)). Although the Cité island had survived the Viking attacks, most of the unprotected Left Bank city was destroyed; rather than rebuild there, after drying marshlands to the north of the island, Paris began to expand onto the Right Bank. In 987 AD, Hugh Capet, Count of Paris, was elected King of France, founding the Capetian dynasty which would raise Paris to become France's capital.
From 1190, King Philip Augustus enclosed Paris on both banks with a wall that had the Louvre as its western fortress and in 1200 chartered the University of Paris which brought visitors from across Europe. It was during this period that the city developed a spatial distribution of activities that can still be seen: the central island housed government and ecclesiastical institutions, the left bank became a scholastic centre with the University and colleges, while the right bank developed as the centre of commerce and trade around the central Les Halles marketplace.
Paris lost its position as seat of the French realm while occupied by the English-ally Burgundians during the Hundred Years' War, but regained its title when Charles VII reclaimed the city in 1437; although Paris was capital once again, the Crown preferred to remain in its Loire Valley castles. During the French Wars of Religion, Paris was a stronghold of the Catholic party, culminating in the St. Bartholomew's Day massacre (1572). King Henry IV re-established the royal court in Paris in 1594 after he captured the city from the Catholic party. During the Fronde, Parisians rose in rebellion and the royal family fled the city (1648). King Louis XIV then moved the royal court permanently to Versailles in 1682. A century later, Paris was the centre stage for the French Revolution, with the Storming of the Bastille in 1789 and the overthrow of the monarchy in 1792.