When the Maguindanao Sultan acceded to Spanish sovereignty in 1861, the colonial government organized several districts to cover the vast plain of the Pulangi. Those who resisted the Spaniards fled towards the interior, to Pagalungan and continued resisting Spanish intrusion into the region. The district of Cotabato was formed in 1860. In 1871, the district covered the military areas of Polloc, Malabang, Reina Regente, Taceran, Babia, Illana, Baras and Lebac. What is presently Cotabato remained outside the area of Spanish activities.
Shariff Kabunsuan and his descendants ruled Cotabato until the coming of the Americans in the early part of the twentieth century. One important feature established by the reign of Shariff Kabunsuan was the introduction of a system of government called Datuism. The system of government is until today still being practiced by some Mohammedans who revere the datu as the dispenser or lawgiver of death. This system developed Muslim culture and kept Muslim united in their struggles against foreigners.
The American forces arrived in the early part of the twentieth century. The Mohammedans under Datu Alamada and Datu Ali put up a very strong resistance in Midsayap, which hastened the coming of General Leonard Wood, then Military Governor, to personally lead the assault on the stronghold. But with the capture of the fortress in Midsayap, the Mohammedans engaged the military forces in guerilla warfare.
The province became part of an autonomous government for Region XII following the Tripoli Agreement of 1976. In 1989, following a plebiscite to determine the extent of the Autonomous Region in Muslim Mindanao (ARMM), the province declined inclusion.