Central America and southern Mexico were inhabited from ancient times by several Native American peoples, most notably the Maya.
The Maya had a long history of advanced civilization. They developed their own forms of writing, mathematics, and astronomy. They carved cities and farms out of jungle wilderness.
In the classic Mayan period, from 300 to 900, they built pyramid temples dedicated to their gods.
Long before the Spanish arrived, the classic Mayan civilization mysteriously collapsed. The great cities were left in ruins, to await rediscovery in future centuries.
By the 1500s, most Mayans lived in small villages in the Central American forests. They became subjects of the Spanish. However, the Spanish could not get as much profit out of their labor as they could from Mexicans or Peruvians.
The hot climate was too harsh, the mineral resources poor. Many Mayans were left more or less untroubled by the Spanish.
Remnants of their ancient language, customs, and religion survive to this day.