Such was the state of affairs at the accession of King Gezo about the year 1818. This monarch, who reigned forty years, raised the power of Dahomey to its highest pitch, extending greatly the border of his kingdom to the north. He boasted of having first organized the Amazons, a force of women to whom he attributed his successes. The Amazons, however, were state soldiery long before Gezo's reign, and what that monarch really did was to reorganize and strengthen the force.
In 1851 Gezo attacked Abeokuta in the Yoruba country and the centre of the Egba power, but was beaten back. In the same year the king signed a commercial treaty with France, in which Gezo also undertook to preserve "the integrity of the territory belonging to the French fort" at Whydah. The fort referred to was one built in the 17th century, and in 1842 made over to a French mercantile house. England, Portugal and Brazil also had "forts" at Whydah--all in a ruinous condition and ungarrisoned. But when in 1852 England, to prevent the slave-trade, blockaded the Dahomeyan coast, energetic protests were made by Portugal and France, based on the existence of these "forts." In 1858 Gezo died. He had greatly reduced the custom of human sacrifice, and left instructions that after his death there was to be no general sacrifice of the palace women.
Gezo was succeeded by his son Gléglé (or Gélélé), whose attacks on neighbouring states, persecution of native Christians, and encouragement of the slave-trade involved him in difficulties with Great Britain and with France. It was, said Earl Russell, foreign secretary, to check "the aggressive spirit of the king of Dahomey" that England in 1861 annexed the island of Lagos. Nevertheless in the following year Gléglé captured Ishagga and in 1864 unsuccessfully attacked Abeokuta, both towns in the Lagos hinterland. In 1863 Commander Wilmot, R.N., and in 1864 Sir Richard Burton (the explorer and orientalist) were sent on missions to the king, but their efforts to induce the Dahomeyans to give up human sacrifices, slave-trading, &c. met with no success. In 1863, however, a step was taken by France which was the counterpart of the British annexation of Lagos. In that year the kingdom of Porto Novo accepted a French protectorate, and an Anglo-French agreement of 1864 fixed its boundaries. This protectorate was soon afterwards abandoned by Napoleon III., but was re-established in 1882. At this period the rivalry of European powers for possessions in Africa was becoming acute, and German agents appeared on the Dahomeyan coast. However, by an arrangement concluded in 1885, the German protectorate in Guinea was confined to Togo, save for the town of Little Popo at the western end of the lagoon of Grand Popo. In January 1886 Portugal--in virtue of her ancient rights at Whydah--announced that she had assumed a protectorate over the Dahomeyan coast, but she was induced by France to withdraw her protectorate in December 1887. Finally, the last international difficulty in the way of France was removed by the Anglo-French agreement of 1889, whereby Kotonu was surrendered by Great Britain. France claimed rights at Kotonu in virtue of treaties concluded with Gléglé in 1868 and 1878, but the chiefs of the town had placed themselves under the protection of the British at Lagos.