The first stone of the cathedral, which adjoins the Royal Palace, was laid in 1883 by King Alfonso XII, and the resulting edifice was consecrated by Pope John Paul II in 1993. Built on the site of the old church of Santa María de la Almudena (thought to be the city's main mosque during Arab rule), the new cathedral was intended to be Gothic in style, with needles and spires; funds ran low, so the design was simplified into the existing, more austere classical form. The cathedral has a wooden statue of Madrid's female patron saint, the Virgin of Almudena, reportedly discovered after the Christian Reconquest of Madrid. Legend has it that when the Arabs invaded Spain, the local Christian population hid the statue of the Virgin in a vault carved in the old Roman wall that encircled the city. When the Christians reconquered Madrid in 1085, they looked for it, and after nine days of intensive praying—others say it was after a procession honoring the Virgin—the wall opened up to show the statue framed by two lighted candles. Its name is derived from the place where it was found: the wall of the old citadel (in Arabic, al mudeyna).