Portugal’s thriving colony incited the envy of its European neighbors. In the early 1500s, the robust pau brasil commerce had lured French interests. In 1550, a French expedition sailed into the Baía de Guanabara and staked claim to the area, with the intent of creating a southern colony baptized French Antarctica.
The Portuguese were not at all pleased with this plan. In 1565, they founded the city of São Sebastião do Rio de Janeiro , and a few years later, they had successfully expulsed the French from the region. When the determined French tried to get a foothold in the Northeast by founding a city of their own, called Saint-Louis, in 1594, the Portuguese succeeded in giving them the boot in 1615, and changing the city’s name to the more patriotic sounding São Luís .
Even more serious was the threat of the Dutch, who, with lucrative but tiny sugar-producing colonies in the Caribbean, were salivating at the chance of adding the vast Northeast  to their possessions. Their initial foray into Brazil —an attack upon and occupation of Salvador  in 1624—was short-lived when they were driven back by Portuguese troops. However, the persistent Dutch, sponsored by the expansive Dutch West Indian Company, then set their sights on Pernambuco, which at the time was the world’s largest producer of sugar.
After burning the capital of Olinda to the ground in 1637, the Protestant Dutch established their own colonial headquarters. To govern the new colony, along came Mauritz van Nassau, an enlightened university-educated count, who not only increased the output of sugar, but also placated the Portuguese Catholic sugar barons by installing a policy of religious tolerance and creating strategic alliances with remaining Indian groups.
By 1640, the capital of Mauritzstaad (later renamed Recife) was a booming port city, and Pernambuco was more stable and richer than it had ever been. Moreover, much to Portuguese chagrin, the Dutch had successfully extended their foothold from Maranhão  in the north to Alagoas in the South. Brazilians might have been speaking Dutch today if Mauritz van Nassau hadn’t resigned, in 1644, disgusted with the greed and narrow-mindedness of the Dutch West Indian Company administrators.
With popular Nassau’s departure, the Portuguese settlers rose up throughout the Northeast. Throughout the next decade, the Dutch were massacred and their plantations razed. Finally, only Recife was left in Dutch hands, and after two decisive battles in 1648 and 1649, they surrendered in 1654, leaving all of Brazil definitively in Portuguese hands.