The church construction was commissioned by Cardinal Torquemada to replace a previous church, which had a timber ceiling and was adjacent to a Dominican convent that had been founded in 1270.
After the capital of the Kingdom of Spain was moved from Valladolid to Madrid, the church came under the patronage of the Duke of Lerma, who had its façade renovated and added numerous artworks in the interior.