The Tamoyo Confederation attacked São Paulo several times between 1562 and 1564 without success. Anchieta and Nóbrega initiated peace negotiations with the Tamoyos in the village of Iperoig in modern Ubatuba on the northern coast of São Paulo state. Anchieta's skill with the Tupi language was crucial in these efforts. After many incidents and the near massacre of Anchieta and Nóbrega by the Indians, they finally succeeded in gaining the Indians' confidence, and peace was established between the Tamoyo and Tupiniquim nations and the Portuguese.