Henry IV of France faced internal religious discord and external threats from Spain in the late 16th century. He issued the Edict of Nantes granting Huguenots religious toleration and repaired France. Louis XIII and Cardinal Richelieu continued centralizing power in the monarchy. Louis XIV ruled France for 72 years and epitomized absolute monarchy, centralizing authority and using the arts to glorify his rule as the "Sun King". He built the palace of Versailles as a symbol of his power.