The mosque had been built where the former Visigothic cathedral had stood .
It was built over the site of the former Visigothic cathedral , which under the Moors had been turned into a mosque .