Despite violent rivalries and the fracturing of the kingdom, it continued to exist independently well into the 19th century. The rise of the clans became noticeable in the 1850s at the end of the reign of Henrique II. In 1855 or 1856, two potential kings emerged to contest the succession following his death. Álvaro Ndongo, a Kimpanzu, claimed the throne on behalf of the Kinlaza faction of Matari, ignoring the existence of Andre's group at Mbanza Puto, calling himself Álvaro XIII; while Pedro Lelo claimed the throne on behalf of the Mbidizi Valley faction of the Kinlaza, from a base at Bembe. Pedro ultimately won a long military struggle, thanks to soliciting Portuguese aid, and with their help his soldiers defeated Álvaro in 1859. Like André II, Álvaro XIII did not accept defeat and established his own base at Nkunga, not far from São Salvador. The Portuguese support which had put Pedro Lelo on the throne had a price, for when he was crowned Pedro V (he was actually the second king named Pedro V; the first one ruled in the late 1770s) he had also sworn a treaty of vassalage to Portugal. Portugal thus gained nominal authority over Kongo, when Pedro gained control of it in 1859, and even constructed a fort in São Salvador to house a garrison.