The chapel, located in the right side of the basilica and dedicated to St. Mary and St. Thomas of Aquino, was built in the late 15th century by will of Cardinal Oliviero Carafa.
Raffaellino also decorated a smaller room annexed to the chapel, which would house Carafa's body after his death, with the Stories of Virginia and other chastity-related themes.