The British had long been familiar with the coast of Nigeria. Originally this was due to their involvement in the slave trade. However with its abolition and ban in the nineteenth century, it switched its interest to Palm Oil for use in soaps and as lubricants for machines. However, Britain's abolition of slavery had been unitlateral and plenty of others took their place. The Royal Navy was therefore tasked with searching and impounding any ships involved in the trade. The islands and deltas of the Nigerian coastline would prove a difficult coast to police with its myriad of inlets, shifting channels and deadly diseases.
The Royal Navy originally used the nearby island of Fernando Po as a base of operations. However, the Spanish claimed the island back in 1855. The Royal Navy therefore needed to find an alternative base.
It was though that Lagos might make a suitable alternative as it had a good harbour and as they had recently aided the king their in his battle for the throne. In 1841 Oba Akitoye ascended to the throne of Lagos and tried to bring an end to the slave trade. Some Lagos merchants resisted the ban and set about deposing him and replacing him with his brother Oba Kosoko. Oba Akitoye meanwhile got the support of the British thanks to his anti-slavery stance. He was aided with Royal Navy ships and shore parties. In 1851 he was reinstalled as the Oba of Lagos.
The Royal Navy set up a base their in 1861. Lagos would prove to be a strategically useful and became a large commercial hub in itself as traders realised that they could expect the protection of the Royal Navy to protect them from pirates or other troublemakers. It would also demonstrate Britain's commitment to the area to other European nations interested in colonising the area. The French were trying to expand their influence and from the 1880s the Germans would also try to move into the area. Britain's military and commercial presence in the area was enough to allow them to claim a protectorate over the area at the Berlin Conference of 1885.
In 1887, the Lagos colony was expanded into the interior in 1887, it officially joined the in 1906.