Gaspar Yanga

Gaspar Yanga—often simply Yanga or Nyanga (May 14, 1545 - ) was an African who led a maroon colony of slaves in the highlands near Veracruz, Mexico (then New Spain) during the early period of Spanish colonial rule. He successfully resisted a Spanish attack on the colony in 1609. The maroons continued their raids on Spanish settlements. Finally in 1618, Yanga achieved an agreement with the colonial government for self-rule of the maroon settlement. It was later called San Lorenzo de los Negros, and also San Lorenzo de Cerralvo. 
In the late 19th century, Yanga was named as a "national hero of Mexico" and "“El Primer Libertador de las Americas"". In 1932 the settlement he formed, located in today's state of Veracruz, was renamed as Yanga in his honor.
Early life.
Yanga, aka Nyanga, was said to be of the Bran people and a member of the royal family of Gabon. He was captured and sold into slavery in Mexico, where he was called Gaspar Yanga. Before the end of the slave trade, New Spain had the fifth-highest slave population (estimated 200,000) of the Americas after Brazil (over 4.9 million), the Caribbean (over 4 million), Cuba (over 1 million) and Hispaniola, where unpaid labor is still a practice in Haiti; it also developed a free black population.
Around 1570, Yanga led a band of slaves in escaping to the highlands near Veracruz. They built a small maroon colony, or "palenque". Its isolation helped protect it for more than 30 years, and other fugitive slaves found their way there. Because the people survived in part by raiding caravans taking goods along the Camino Real (Royal Road) between Veracruz and Mexico City, in 1609 the Spanish colonial government decided to undertake a campaign to regain control of this territory.
Spanish 1609 attack.
Led by the soldier Pedro González de Herrera, about 550 Spanish troops set out from Puebla in January; an estimated 100 were Spanish regulars and the rest conscripts and adventurers. The maroons were an irregular force of 100 fighters having some type of firearm, and 400 more armed with stones, machetes, bows and arrows, and the like. These maroon troops were led by Francisco de la Matosa, an Angolan. Yanga—who was quite old by this time—decided to use his troops' superior knowledge of the terrain to resist the Spaniards, with the goal of causing them enough pain to draw them to the negotiating table.
Upon the approach of the Spanish troops, Yanga sent terms of peace via a captured Spaniard. He asked for a treaty akin to those that had settled hostilities between Indians and Spaniards: an area of self-rule in return for tribute and promises to support the Spanish if they were attacked. In addition, Yanga said this proposed district would return any slaves who might flee to it. This last concession was necessary to soothe the worries of the many slave owners in the region. 
The Spaniards refused the terms and went into battle, resulting in heavy losses for both sides. The Spaniards advanced into the maroon settlement and burned it. But, the maroons fled into the surrounding terrain, which they knew well, and the Spaniards could not achieve a conclusive victory. The resulting stalemate lasted years; finally, the Spanish agreed to parley. Yanga's terms were agreed to, with the additional provisos that only Franciscan priests would tend to the people, and that Yanga's family would be granted the right of rule. In 1618 the treaty was signed. By 1630 the town of San Lorenzo de los Negros de Cerralvo was established. Located in today's Veracruz province, the town in the 21st century is known as Yanga.
Legacy and honors.
In 1871, five decades after Mexican independence, Yanga was designated as a "national hero of Mexico" and "El Primer Libertador de las Americas." This was based largely on an account by historian Vicente Riva Palacio. The influential Riva Palacio was also a novelist, short story writer, military general, and mayor of Mexico City. In the late 1860s he found in Inquisition archives accounts of Yanga and of the 1609 Spanish expedition against him, as well as the later agreement. He published an account of Yanga in an anthology in 1870, and as a separate pamphlet in 1873. Reprints have followed, including a recent edition in 1997. Much of the subsequent writing about Yanga was influenced by the works of Riva Palacio. He characterized the maroons of San Lorenzo de los Negros as proud men who would not be defeated.