Before the sixteenth century, the land around Versailles, not far from the royal château of Saint-Germain-en-Laye, was prime hunting territory. The first mention of Versailles was in 1038 in the deeds of the abbaye de Saint-Père-en-Vallée near Chartres with a Hugo de Versailliis as one of the signatories. The later lords of Versailles came under the direct authority of the king of France.
By 1561, the property belonged to Martial de Loménie, the finance minister of Charles IX, who increased the domain to over three hundred acres and who was assassinated on the night of Saint Bartholomew, 24 August 1572. Albert de Gondi (Gongi), a native of Florence and a member of the court of Catherine de Médicis, purchased the estate.
The future Henri IV spent time in Versailles before he became the King of France. His passion for hunting, which his descendants shared, determined the future destiny of Versailles. The young Dauphin sometimes accompanied the king on these hunts.
On becoming king, Louis XIII often returned to hunt in Versailles. In 1623, he built, at the top of a small hill, a simple pavilion, or hunting lodge, made of brick, stone and capped by a slate roof. Louis XIII transformed and enlarged this first castle (the Château des Cartes) from 1631 to 1634--before even having accomplished the purchase of the territory, which took place 8 April 1632, when he bought the estate from Jean-François de Gondi, Archbishop of Paris.
Philibert le Roy undertook work on the first true château and widened the building, rebuilt the wings and added four houses. While work was in progress, Louis XIII acquired new lands. He intended to retire to Versailles as soon as the Dauphin reached his majority, but the king's premature death in 1643 prevented him from fulfilling his wish.