Alamansa died at Dansalan. He had many children, two of whom were Raja Twā, and Datu Dakūla, the prince of Sibugay. Raja Twā begot Untung and Perti. The nation looked to Raja Twā to succeed Sultan Kawāsa, but he died before his uncle, and the sultanate fell to his young son, Untung. Intirīnu was rejected for family reasons and Datu Dakūla was set aside to give representation to the favorite house of Twā.
Untung was known as Sultan Sakandar Qudratu-l-Lāh (Alexander, the power of God). He was also surnamed Jamālu-l-A’lam (A’zham), which means “greatest beauty.” Qudrat the Second was the last sultan who observed all the customs and rites of the sultanate. He was young when he assumed power, and his reign marked the beginning of the downfall of the sultanate and the actual occupation by Spain of the Rio Grande Valley. In the treaty of 1837 he submitted to the sovereignty of Spain and accepted the subordinate title of Feudatory King of Tamontaka. Spain appointed his successor and prohibited his people from invading any territory west of Point Flechas. She regulated the licensing of boats sailing beyond Zamboanga and erected a trading house at Paygwan, at the mouth of the Rio Grande.
In 1843 Datu Dakūla ceded to Spain the west coast of the Zamboanga peninsula, promised to aid in suppressing slavery, and acknowledged Spanish protection.
In 1845 Sultan Qudrat confirmed the treaty of 1837, with a more definite submission, and allowed the establishment of a Spanish trading house at Cotabato.
This aggression on the part of Spain was prompted by her increased strength and an additional naval revival. Steamboats and improved firearms ended Moro aggression and solved the Moro question. In 1851 Polloc was occupied and was made a naval station. In 1857 Spanish boats advanced as far up as Tambao and drew up a treaty with the sultan of Talakūkū in which he acknowledged his surrender and his submission to the authority of Spain. In 1861 camps were established at Cotabato, Libungan, Tambao, Taviran, and Tamontaka.
Sultan Qudrat begot Mamakū, Ambuludtu, Mastūra, Raja Putri, and others. Mamakū is the present Raja Muda of Magindanao and lives at Cran, Sarangani. Ambuludtu and Mastūra are living at Nūling, about 1 mile above Cotabato. Raja Putri, generally known as the Princesa, was Datu Ūtū’s wife.
Sultan Mohammed Makakwa, the son of Intirīnu, succeeded Qudrat. He was the last sultan of Magindanao who lived in Cotabato. The Spaniards paid him a monthly salary of 70 pesos, but kept him under complete control. In his days modern Cotabato was built, and in 1871 it was made the capital of Mindanao. An earthquake destroyed the town that year, and in 1872 it was abandoned as capital in favor of Zamboanga.
Makakwa died about 1883, and his son, Pablu, became sultan. Pablu’s full title was Sultan Mohammed Jalālu-d-Dīn Pablu. He lived at Banūbu, opposite Cotabato, and was the last sultan who received a salary from the Spanish Government.
In 1884 the Spanish engaged the forces of Idrīs, the sultan of Talakūkū, on the banks of the river at Tambao and completely defeated him. Idrīs then signed a treaty acknowledging unconditional surrender and submission.
During Pablu’s life General Terrero conducted the campaign of 1886–87 against Datu Ūtū of Bwayan, and the Spanish gunboats destroyed every fort on the river.