Real Sitio de San Ildefonso

San Ildefonso, La Granja , or La Granja de San Ildefonso, is a town and municipality in the Province of Segovia, in the Castile and León autonomous region of central Spain.

It is located in the foothills of the Sierra de Guadarrama mountains, 11 km from Segovia, and 80 km north of Madrid.

La Granja palace
"La Granja" (Royal Palace of La Granja de San Ildefonso) is a royal palace and gardens built adjacent to the town in 1721-24. It was commissioned by King Philip V, and designed in the Spanish Baroque and French Baroque styles. It was modeled on the Palace of Versailles, that was built by Philip's grandfather Louis XIV of France, and has been called the "Versailles of Spain." The palace is set in extensive gardens designed in the Jardin à la française style, whose epitome is the Gardens of Versailles, and beyond those surrounded in English landscape style gardens and woodlands.

For the next two hundred years, La Granja was the court's main summer palace, until the Second Spanish Republic formed in 1931.

La Granja and the town are a popular tourist destination. The royal site is part of the Patrimonio Nacional of Spain, which holds and maintains many of the Crown's lands and palaces. It is a popular tourist attraction, with paintings, portraits, and a museum of Flemish tapestries.

Events
Three important international treaties between Spain and France or Portugal bear the name Treaty of San Ildefonso. They were each negotiated and signed at La Granja palace between 1777 and 1800.

On 12 August 1836 at La Granja palace, some of the Liberal leaders compelled Queen Christina to sign a decree restoring the Constitution of 1812.