Maria I vowed to build a church if she had a son and heir. The basilica fulfilled that promise and later became the queen's own burial place.