Cusco, Peru, was the capital of the Inca Empire. When the Spanish took the place in 1533-36 they built their main monuments right over the foundations of the Inca palaces and temples. This was a conscious strategy pursued especially by Spanish missionaries -- churches were built on top of temples to appropriate their spiritual power for Christianity, and to prevent their continuation as pagan holy monuments. Plus people were already used to visiting those spots for worship.
The cathedral was built adjacent to the first church in Cusco, the Church of the Triumph. In 1535 a group of Inca warriors rebelled against the Spaniards, who took refuge in a stout armory building called the Suntur Wasi. When the rebellion was put down, they built this church over the ruins of the Suntur Wasi to mark their deliverance.
Detail from the Iglesia del Triunfo.
Construction of the cathedral began in 1559 and was completed in 1664. It was designed by Spanish soldier and architect Juan Miguel de Veramendi. It was built over the ruins of an Inca building known as Kiswarkancha, which seems to have served as both a temple and the palace of Viracocha Inca, one of the greatest rulers of the Inca state. Much of the stone for the cathedral was taken from the Saqsaywaman, the great Inca fortress that overlooks the town.
This the church of Santo Domingo in Cusco, where you can see the Spanish walls resting on the stone foundations of the Inca Temple of the Sun.
These days the cathedral is best known as a repository of Peruvian art, including many pieces from the 17th and 18th centuries.
Famous painting of the Last Supper featuring roast guinea pig.
These chapels. Wow.
In the courtyard.
Since Peruvian independence there has been in a change in attitude toward the pre-Christian past throughout the country but especially in Cusco. This Inca warrior was added to the main square in the mid 20th century. Incidentally, if you grew up spelling this place's name Cuzco, you should know that that obviously oppressive colonialist spelling was banned (yes, banned) by municipal law in 1976.
The wikipedia article on this cathedral might need a little work, since it says the cathedral was built in a "Gothic-Renaissance" style.