Nigeria’s Acting President Yemi Osinbajo has appointed a new boss for the domestic spy agency after masked gunmen took control of the parliamentary building on Wednesday, causing a political uproar in the West African state.

Matthew Seiyefa would act as the new director-general of the Department of State Security Service, replacing Lawal Daura who was sacked for what Mr Osinbajo's office called the "unlawful takeover" of the parliamentary complex.

It is unclear why the masked gunmen - linked to the spy agency - took control of the building, but opposition lawmakers said it was an attempt to intimidate and block them from entering parliament after they defected from the ruling party.