The first attempt to establish a Portuguese presence in Brazil was made by John III in 1533. His solution was simplistic; he divided the coastline into fifteen sections, each about 150 miles long, and granted these strips of land, on a hereditary basis, to fifteen courtiers, who become known as donatários. Each courtier was told that he and his heirs could found cities, grant land, and levy taxes over as much territory as they could colonize inland from their stretch of coastline. Only two of the donatários were to have any success in this venture. In the 1540s, John III was forced to change his policy. He placed Brazil under direct royal control (as in Spanish America) and appointed a governor general. The first governor general of Brazil arrived in 1549 and headquartered himself at Bahia (today known as Salvador). It remained the capital of Portuguese Brazil for more than two centuries, until replaced by Rio de Janeiro in 1763.