In 1786, following Frederick's death, Lagrange received similar invitations from states including Spain and Naples, and he accepted the offer of Louis XVI to move to Paris. In France he was received with every mark of distinction and special apartments in the Louvre were prepared for his reception, and he became a member of the French Academy of Sciences, which later became part of the Institut de France (1795). At the beginning of his residence in Paris he was seized with an attack of melancholy, and even the printed copy of his "Mécanique" on which he had worked for a quarter of a century lay for more than two years unopened on his desk. Curiosity as to the results of the French revolution first stirred him out of his lethargy, a curiosity which soon turned to alarm as the revolution developed.