Sarhili was allowed to return to the Transkei, but the Gcalekas were forced to share their old lands with the Mfengus, whom they despised. In August 1877, when tensions were high between the two tribes, a quarrel arising at a Mfengu wedding party provoked the Ninth (and last) Frontier War. The Cape Frontier Police under Col Charles Griffith crossed the Kei with a volunteer force to protect the Mfengus, and with the aid of the Thembus and Mfengus pushed the Gcalekas beyond the Mbashe River (September 1877).
But Sir Bartle Frere, the High Commissioner, overthrew Sarhili and decided that Galekaland should be settled by whites and the Gcalekas disarmed once and for all. One minor Gcaleka clan was chased into the location of Sandile, the Ngqika chief. The Ngqikas fired on the police, were joined by the Gcalekas in an attack on the Colony and gained support from the Thembus. The war provoked a constitutional crisis at the Cape, which had received responsible government in 1872. The Cape ministry under Molteno insisted that the combined force of regular troops, colonial police and volunteers be under the full command of Comdt Gen Griffith. Sir Bartle Frere insisted that he, as Imperial Commander-in-Chief, take charge of the conduct of the war, subsequently; he dismissed the Molteno cabinet, appointing a new ministry under Gordon Sprigg in its place.
The ninth war was soon over. In February 1878 Sarhili's forces were defeated in Centani and Sarhili surrendered in June. By then Sandile had died and an amnesty was granted to his followers. In 1879 Mfenguland and the Idutywa district were annexed to the Cape, and Gcalekaland, though not formally annexed, was administered by the Cape under the chief magistrate of the Transkei. By 1894 the boundaries of the Cape had been peacefully extended to the Mtamvuna River by the piecemeal annexation of the remaining nominally independent tribal areas.