Pre-20th century
Lagos developed from a small farming community that moved from the mainland to the island for greater security, probably in the 17th century. The settlement became involved in the slave trade in the 18th century and grew to be a major slave port in the early 19th; by the middle of the century it had become the most important slave port in West Africa. British intervention dates from 1861, with the establishment of the Lagos colony. With this stimulus Lagos grew rapidly in importance. In 1895 the railway that reached Kano in 1912 was started, and the poor natural harbour was improved soon after.
20th century
The town was made the capital of the new Protectorate of Southern Nigeria in 1906 and of the entire country of Nigeria in 1914. With the expansion of the road network and the development of cocoa plantations and other agriculture, Lagos grew rapidly in the 20th century. New port facilities were established on the western shore at Apapa, and the town spread back onto the mainland, where the growth of new industries attracted a steady flow of immigrants to the city.
Onikan National Museum (1957) has one of the world's richest collections of African art, and the city is also the home of the National Library, the Federal Radio Corporation of Nigeria, and the Nigerian Television Authority.
The city is the major western terminus of Nigeriaseverals roads and railways and is served by the international airport at Ikeja. The University of Lagos was founded in 1962.