The Dutch having defeated the Portuguese colonial resistance, and the Portuguese Monarchy having been restored in 1640, a truce was signed between Portugal and the Netherlands. Nevertheless, in 1645, Martim Soares Moreno took part in the clandestine movement that ended with the expulsion of the Dutch from Brazilian territory.