Following the 1807 abolition of the British slave trade, Lagos under Oba Kosoko remained one of the most active slave-export ports on the West African coast. On the urging of Akitoye (Kosoko's exiled rival) and Consul John Beecroft, the Royal Navy mounted 'Operation Reduction of Lagos' from 26 to 28 December 1851 — three days of shelling by HMS Bloodhound, HMS Teazer and supporting vessels. Kosoko fled to Epe; Akitoye was installed as Oba and signed the 1852 Treaty between Great Britain and Lagos abolishing the slave trade and granting British consular jurisdiction.
In 1861, after Akitoye's death, his son Dosunmu was pressured by Consul William McCoskry and Commander Bedingfield aboard HMS Prometheus into signing the Treaty of Cession (6 August 1861), under which Lagos was annexed as a Crown Colony. The 1851 bombardment is therefore the inauguration of British rule in what is now Nigeria — a full 63 years before the 1914 amalgamation.