Gaspar Yanga—often simply Yanga or Nyanga—was a leader of a slave rebellion in Mexico during the early period of Spanish colonial rule. Said to be of the Bran people and member of the royal family of Gabon, Yanga came to be the head of a band of revolting slaves near Veracruz around 1570. Escaping to the difficult terrain of the highlands, he and his people built a small maroon colony, or palenque. For more than 30 years it grew, partially surviving by capturing caravans bringing goods to Veracruz. However, in 1609 the Spanish colonial government decided to undertake a campaign itself to regain control of the territory.
Led by the soldier Pedro González de Herrera, the Spanish troops which set out from Puebla in January 1609 numbered around 550, of which perhaps 100 were Spanish regulars and the rest conscripts and adventureres. The maroons facing them were an irregular force of 100 fighters with some type of firearm, and four hundred more with primitive weapons such as 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 employ 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. Essentially, Yanga 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, he suggested that this proposed district would return any slaves which 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 a battle was fought, yielding heavy losses for both sides. The Spaniards advanced into the settlement and burned it. However, the people fled into the surrounding terrain, and the Spaniards could not achieve a conclusive victory. The resulting stalemate lasted years; finally, unable to win definitively, 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 and by 1630 the town of San Lorenzo de los Negros de Cerralvo was established. This town, in today's Veracruz province, remains to this day under the name of Yanga
Five decades after Mexican independence Yanga was made a national hero of Mexico by the diligent work of Vicente Riva Palacio. The influential Riva Palacio was an historian, novelist, short story writer, military general and mayor of Mexico City during his long life. In the late 1860s he retrieved from dusty Inquisition archives accounts of Yanga and of the expedition against him. From his research, he brought the story to the public 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 mythmaking of Riva Palacio, who developed the image of proud fugitives who would not be defeated.