Nigeria's military command has ordered a major reshuffle of senior officers, an army statement said on Friday, as the government faces pressure over the country's growing insecurity.
Nigeria's security forces are overstretched on several fronts, battling a grinding 13-year jihadist war in the northeast, bandit militias in the northwest and separatist agitation in the southeast.
A sophisticated attack on a prison outside the capital this month claimed by the Islamic State group was a major embarrassment for the armed forces, as jihadists struck just 40 km (25 miles) from President Muhammadu Buhari's villa and near the international airport.
A convoy of presidential security and protocol staff preparing for Buhari's visit to his home state of northwest Katsina was ambushed just days before.
Soldiers from the presidential guard were also ambushed by gunmen again this week just outside the capital.
Chief of Army Staff Lieutenant General Faruk Yahaya ordered the restructuring "in an effort to reposition the Nigerian Army (NA) for operational efficiency and proficiency," the statement said.
Security will be a major theme in 2023 presidential elections to replace Buhari, who steps down after two terms allowed under the constitution.
Among the army changes were commanding officers, brigade commanders, commanders of training institutes and staff at the army headquarters.
New general commanding officers were appointed to Division 81 in Lagos, Division 82 in southeast Enugu, as well as Division 1 in northeast Kaduna State and division 2 in southwest Oyo State.
Buhari, a former army commander and military ruler during Nigeria's dictatorship, was first elected partly on his image as a strongman who could tackle Boko Haram jihadists.
But critics say his government has failed to bring insecurity under control.
"We are in a very difficult situation... Mr. President understands people's concerns about the growing insecurity," national security adviser Babagana Monguno said on Wednesday after a security council meeting.
"But I can assure you that there's no straight cut and dried method of dealing with this thing unless all of us embrace each other."
Opposition lawmakers this week threatened to impeach Buhari over insecurity, though they have little chance of success with his ruling APC party holding a majority.
The jihadist conflict has shifted, with militants no longer controlling the large swathes of territory they once held in the northeast, but the Kuje prison attack highlighted their threat to other parts of the country.
Hundreds of thousands of people have also been displaced in rural areas of the northwest, where bandit militias raid villages to loot and kidnap scores of residents to hold them for ransom in forest hideouts.