Louis began his personal rule of France in 1661 after the death of his chief minister, the Italian Cardinal Mazarin. An adherent of the theory of the divine right of kings, which advocates the divine origin and lack of temporal restraint of monarchical rule, Louis continued his predecessors' work of creating a centralized state governed from the capital. He sought to eliminate the remnants of feudalism persisting in parts of France and, by compelling the noble elite to inhabit his lavish Palace of Versailles, succeeded in pacifying the aristocracy, many members of which had participated in the Fronde rebellion during Louis' minority. By these means he consolidated a system of absolute monarchical rule in France that endured until the French Revolution.
Upon his death just days before his seventy-seventh birthday, Louis was succeeded by his five-year-old great-grandson, Louis XV. All his intermediate heirs—his son Louis, le Grand Dauphin; the Dauphin's eldest son Louis, duc de Bourgogne; and Bourgogne's eldest son and his second eldest son, Louis, duc de Bretagne (the older brothers of the future Louis XV)—predeceased him.
Louis XIV was born on 5 September 1638 in the Chateau of Saint-Germain-en-Laye to Louis XIII and Anne of Austria. At the time of his birth, his parents had been married for twenty-three years without surviving issue (his mother experienced four stillbirths between 1619 and 1631). Leading contemporaries thus regarded him as a divine gift, and his birth, a miracle of God. He was often referred to as "Louis-Dieudonné" (Louis-God-given) and also bore the traditional title of French heirs apparent—Dauphin.
Recognising that his death was imminent, Louis XIII in 1643 prepared for his son's impending minority rule. He decreed that a regency council should rule on Louis's behalf for the duration of the minority. Contrary to custom, he did not make Anne the sole regent despite her having given birth to Louis and his brother Philippe, because he doubted her political abilities. He did however make her the head of the Council.
On 14 May 1643, with Louis XIII dead, Anne had her husband's will annulled by the Parlement de Paris (a judicial body comprising mostly nobles and high clergymen), abolished the regency council, and became the sole regent. She then entrusted power to Cardinal Mazarin.
Subsequently, in 1648, Mazarin successfully negotiated the Peace of Westphalia. Although war continued between France and Spain until the Treaty of the Pyrenees in 1659, the Peace of Westphalia ended the Thirty Years' War in Germany. Its terms ensured Dutch independence from Spain, awarded some autonomy to the various German princes, and granted Sweden seats on the Imperial Diet and territories to control the mouths of the Oder, Elbe and Weser. France, however, profited most from the settlement. Austria ceded to France all Habsburg lands and claims in Alsace and acknowledged her de facto sovereignty over the Three Bishoprics. Moreover, eager to emancipate themselves from Habsburg domination, petty German states sought French protection. This anticipated the formation of the 1658 League of the Rhine, leading to the further diminution of Imperial power.
As the Thirty Years' War came to an end, a civil war—the Fronde—erupted in France. It effectively checked France's ability to exploit the Peace of Westphalia. Mazarin had largely pursued the policies of his predecessor, Cardinal Richelieu, augmenting the Crown's power at the expense of the nobility and the Parlements. The Frondeurs, political heirs of a dissatisfied feudal aristocracy, sought to protect their traditional feudal privileges from an increasingly centralized royal government. Furthermore, they believed their traditional influence and authority was being usurped by the recently ennobled bureaucrats (the Noblesse de Robe) who administered the Kingdom and on whom the Monarchy increasingly began to rely. This belief intensified their resentment. In 1648, Mazarin attempted to tax members of the Parlement de Paris. The members not only refused to comply, but also ordered all his earlier financial edicts burned. Buoyed by the victory of Louis, duc d'Enghien (later le Grand Condé) at Lens, Mazarin arrested certain members in a show of force. Paris erupted in rioting. A mob of angry Parisians broke into the royal palace and demanded to see their king. Led into the royal bedchamber, they gazed upon Louis, who was feigning sleep, were appeased, and quietly departed. The threat to the royal family prompted Anne to flee Paris with the king and his courtiers. Shortly thereafter, the conclusion of the Peace of Westphalia allowed Condé's army to return to aid Louis and his court. As this first Fronde (Fronde parlementaire, 1648–1649) ended, a second (Fronde des princes, 1650–1653) began. Unlike that which preceded it, tales of sordid intrigue and half-hearted warfare characterised this second phase of upper-class insurrection. To the aristocracy, this rebellion represented a protest against and a reversal of their political demotion from vassals to courtiers. It was headed by the highest-ranking French nobles, among them Louis's uncle, Gaston, duc d'Orléans, and first cousin, la Grande Mademoiselle; more distantly related Princes of the Blood, like Condé, his brother, Conti, and their sister the duchesse de Longueville; dukes of legitimised royal descent, such as Henri, duc de Longueville, and François, duc de Beaufort; and princes étrangers, such as Frédéric Maurice, duc de Bouillon, his brother, the famous Marshal of France, Turenne, and Marie de Rohan, duchesse de Chevreuse; and scions of France's oldest families, such as François, duc de La Rochefoucauld.