In 1914, the area of Northern Nigeria and Southern Nigeria were united. This was mainly due to the growing international tension and war with Germany. In fact, Nigeria would be used as a base of operations against the German colony of Cameroon in 1914/15.
Nigeria with its natural resources and high population density was one of the more profitable and economic colonies. It also produced goods that were not in competition with the white settler agrarian colonies which meant that it could avoid the worst of excesses of the depression in the 1930s which hurt the standard commodoties more than the exotic products of Nigeria.
World War two was to further cement the economic well being of the colony as it good provide products to the empire from a safe base. Other than U-boats there was no strategic threat to the colony in this war.
The relative wealth for the colony made it a clear candidate for one of the first African nations to be granted independence. The fact that Nigeria had pioneered the indirect form of rule bequeathed by Lugard, also meant that its transition would be easier than most other colonies as they still pretty much maintained the old power structures intact. Consequently, Nigeria was federated in 1954 and made fully independent in 1960.