As a result of her loss of status at court, she visited the house less and less. In 1685, the king formally made it over to her as a gift, partially for the sake of their eldest natural son, the beloved Duc du Maine. In June 1692, Madame de Montespan retired to a convent. At her death in 1707, the duc du Maine inherited Clagny, followed in time by his grandson, the Prince de Dombes, who as it turned out became the last of his line. The château reverted to the Crown in 1766. By then, the château, which Madame de Sévigné estimated to have cost not less than two million livres, and to have kept 1200 workers occupied, suffered from years of neglect. It was virtually unoccupied for forty years, and the dampness of the surrounding environment greatly accelerated its deterioration. Gradually, the "quartier nouveau" of the town of Versailles expanded to the edge of the estate of Clagny, nestling in the northern corner between the château and the "étang de Clagny", the pond in its park. In 1736, following an episode of ""fièvre paludéenne"", possibly malaria, in the "quartier Notre-Dame" of Versailles, it was decided to drain the pond and fill it in. When the ownership of Clagny reverted to the Crown, Louis XV gave some eleven hectares at the edge of the estate to his very religious queen, Maria Leszczyńska, who used the land to establish an Ursuline convent which was built from 1767 to 1772 according to the designs of Richard Mique. The château was demolished in 1769. Some of its dressed stone was employed in constructing the nearby new convent and other stone found its way into the "hôtels particuliers" along the new "Boulevard de la Reine", built through the park in 1772. The park was further subdivided under the Second Empire; one part now hosts the Science division of the Versailles Saint-Quentin-en-Yvelines University and the "pavillon" Panhard.