Can Pech, Cun Pech, Kaan Pech, or Kaan Peech, was the name of a Maya chiefdom of the southwestern Yucatán Peninsula, before the arrival of the Spanish conquistadors in the sixteenth century. Can Pech was south of Ah Canul and north of Chakán Putum, on the coast of the Gulf of Mexico. In 1517 the population of the capital city Campeche was approximately 36,000 (judging by the description of the city by Bernal Diaz del Castillo).
In Yucatec Kaan Peech means snake tick. Can Pech was founded by Ah k'iin peech. Ah Kin or Ah K'iin being a rank of priest.
During the Preclassic and Classic period, around the area of Can Pech, important cities and towns were built. They include Becan, Edzná, Dzibilinocac, Alimochei, Jaina, Nadzcaan, Balamkú, Calakmul, Xcalumkín, Kankí, Chunhuhub, Xtampac, and Hochob. Most of these places were part of the Puuc polity.
In the early 900s the Toltecs took control over northern Yucatán. After the Toltecs left, the League of Mayapan became the main power in the area in 987.
In 1441 a civil war broke out between the Cocom and the Tutul-Xiu. The war was powerful enough that by 1461 the League had completely broken up into several different countries called Kuchkabal. It was during this time that Ah k'iin peech founded Can Pech.
On March 22, 1517 a Spanish ship docked in Campeche city. The Spaniards traded for water with the Maya there.
Missed the water and we had to jump ashore with the people, and was a Sunday of Lazarus, and this cause proceeded to that town name Lazarus, and so is the sea charts, and the proper name of Indian Campeche said ... And was there a good water well, where the natives of that population drank in those lands because, as we have seen there are no rivers, and took the pipes to fill them with water, and turn to the ships. And as they were full and wanted us to ship, came the people work fifty Indians, with good cotton blankets and peace, and what appeared should be caciques, and tell us by signs what we wanted and gave them to understand that water and then go to the ships, and we noted with hands if we came from where the sun rises and said "Castilan", "Castilan" and not look in lecture about "Castilan" - True History of the Conquest of New Spain, Bernal Díaz del Castillo
The Spaniards were taken into the city and given a tour of the palaces and pyramids. They were treated well and they treated the Maya there well. But there was tension after having recently lost a battle with Ekab soldiers.
And being so many other Indians came, they brought very dastardly blankets, buckets full of reeds and put on a plain, and then, after these, came two squadrons of Indian archers, spears and shields, and slings and stones, with their weapons of cotton, and made in concert and each squad captain, which is short distance away from us; and then at that moment went to another house, which was his shrine idols, ten Indians who brought clothes blankets long cotton that gave to their feet, and were white, and very big hair, full of revolt blood with them, they can not even comb desparcir or if not cut; Indians whom were priests of idols, which in New Spain potatoes are commonly called, and thus will name hereafter ... And those potatoes brought incense, as a way of resin called copal among them, and with clay braziers full of coals we began to fumigate, and signs will tell us that we leave their lands before that there are joint wood fire place and burn finished; if not, we will kill war. And then they sent fire to the reeds and the popes were, no more no talk". - "Conquest of Yucatán", Diego Lopez de Cogollado
In 1526 Francisco de Montejo was given permission to conquer Yucatán. In 1527 he invaded. Francisco began in the east and moved west. By 1529 when he reached Cupul his forces were so beaten that they were forced to retreat back to Spain defeated.
In 1531 The Spaniards invaded again, directly into the city of Campeche. They conquered Can Pech. After the battle the Spaniards only had ten cavalry and fifty five foot soldiers left. A reinforcement of 20,000 Maya soldiers was sent to the city and the Spaniards were easily defeated.
In 1540 the third and finale invasion started in Chakan Putum. The Spaniards sent diplomats into Can Pech to convince the Batab (Municipal leaders) to swear allegiance to the crown of Spain. On October 4 The Spaniards invaded Campeche. Betrayed by the Batab the city was overwhelmed.
After the war between the Tutul Xiu and Cocom, the Yucatán Peninsula, broke up into 16 Kuchkabal. in the present day state of Campeche there was Ah Canul, Can Pech, and Chakán Putum. Conflicts between Kuchkabal were common, especially between Tutul Xiu and Cocom.
Normally each Kuchkabal had a capital where the ruler and supreme priest lived. The ruler was called a Halach Uinik. Each Kuckabal was divided into several municipalities called "Batalib" which in turn were governed by officials called " Batab "who were usually relatives of the Halach Uinik. Each Batab, was the military leader of its population.
On the religious side, after Halach Uinik, was the Ah Kin May, and the regular priests Ah Kin(meaning coming from the Sun). Also there was a sacrificial priest called "Ah Nacom".
Most of Campeche's population lived near the coast. The Puuc hills had been densely populated in the classic Maya period, but were largely abandoned after the Maya collapse.
There may have been as many as 36,000 people in Campeche at the time of the first contact with Spaniards. But by 1540 only 5,985 people were left in the city, largely because of smallpox.