When Ecuador seceded from the Gran Colombia, Peru decided not to follow the treaty of Guayaquil of 1829 or the protocoled agreements made. Peru contested Ecuador's claims with the newly discovered ''Real Cedula'' of 1802, by which Peru claims the King of Spain had transferred these lands from the Viceroyalty of New Granada to the Viceroyalty of Peru. During colonial times this was to halt the ever-expanding Portuguese settlements into Spanish domains, which were left vacant and in disorder after the expulsion of Jesuit missionaries from their bases along the Amazon Basin. Ecuador countered by labeling the Cedula of 1802 an ecclesiastical instrument, which had nothing to do with political borders. Peru began its de facto occupation of disputed Amazonian territories, after it signed a secret 1851 peace treaty in favor of Brazil. This treaty disregarded Spanish rights that were confirmed during colonial times by a Spanish-Portuguese treaty over the Amazon regarding territories held by illegal Portuguese settlers.