The Royal Site of San Lorenzo de El Escorial is a historical residence of the King of Spain, in the town of San Lorenzo de El Escorial, about 45 kilometres (28 mi) northwest of the capital, Madrid, in Spain. It is one of the Spanish royal sites and functions as a monastery, royal palace, museum, and school. There is another town, 2.06 km further down the valley (4.1 km road distance), called 'El Escorial'.
The Escorial comprises two architectural complexes of great historical and cultural significance: the royal monastery itself and La Granjilla de La Fresneda, a royal hunting lodge and monastic retreat about five kilometres away. These sites have a dual nature; that is to say, during the 16th and 17th centuries, they were places in which the power of the Spanish monarchy and the ecclesiastical predominance of the Roman Catholic religion in Spain found a common architectural manifestation. El Escorial was, at once, a monastery and a Spanish royal palace. Originally a property of the Hieronymite monks, it is now a monastery of the Order of Saint Augustine.
Philip II of Spain, reacting to the Protestant Reformation sweeping through Europe during the 16th century, devoted much of his lengthy reign (1556–1598) and much of his seemingly inexhaustible supply of New World gold to stemming the Protestant tide. His protracted efforts were, in the long run, partly successful; however, the same counter-reformational impulse had a much more benign expression thirty years earlier in Philip's decision to build the complex at El Escorial.
Philip engaged the Spanish architect, Juan Bautista de Toledo, to be his collaborator in the design of El Escorial. Juan Bautista had spent the greater part of his career in Rome, where he had worked on the basilica of St. Peter's, and in Naples, where he had served the king's viceroy, whose recommendation brought him to the king's attention. Philip appointed him architect-royal in 1559, and together they designed El Escorial as a monument to Spain's role as a center of the Christian world.
On 2 November 1984, UNESCO declared The Royal Seat of San Lorenzo of El Escorial a World Heritage Site. It is a popular tourist attraction, often visited by day-trippers from Madrid - more than 500,000 visitors come to El Escorial every year.