Miguel López de Legazpi was searching for a suitable place to establish the Spanish colonial capital after being forced to leave first Cebu and then Iloilo by Portuguese pirates. In 1570, Martin de Goiti and Captain Juan de Salcedo, with food stocks diminishing, discovered a rich kingdom on Luzon and saw its potential. De Goiti anchored at Cavite, and tried to establish his authority peaceably by sending a message of friendship to Maynila.