on 19 may 1571, the local sovereigns sulayman iii and rajah matanda ceded kota selurong (a client state of the sultanate of brunei) as well as the kingdom of tondo to the spanish empire, with miguel lópez de legazpi, who had arrived from mexico, consecrating the city to both saint pudentiana and our lady of guidance. in 1578, phillip ii of spain issued a royal decree invoking our lady of guidance to be "sworn patroness" of manila. the statue was first enshrined in manila cathedral inside the citadel of intramuros until 1606, when the first shrine compound was built on the current site. called "la hermita" ("the hermitage") because of a mexican hermit who lived in the area, the shrine was originally made of bamboo, nipa, and molave wood. it was later rebuilt in stone but suffered damaged in an earthquake in 1810.