UN chief Ban Ki-moon on Monday hailed Nigeria's "greater stability and peace" under its new leader as he commemorated a deadly attack on the global body by Boko Haram militants.
The secretary-general hugged relatives of the victims of the 2011 bombing as he laid a wreath at United Nations House in the capital Abuja and praised "the extraordinary fortitude and determination" of the survivors.
"Our fallen colleagues and partners will be remembered this morning with a moment of silence in many places," he said.
"But nowhere are the memories of these colleagues more immediate, more vivid and more compelling than here in Abuja. We will remember them forever as truly the best of humanity."
Twenty-four people died when a bomb-laden car exploded at UN House, the headquarters for around 400 employees, on August 26, 2011.
Radical Islamist sect Boko Haram, blamed for the deaths of at least 15,000 people during a six-year-insurgency, mainly in the country's northeast, claimed responsibility for the attack.
"The terrorists attacked the United Nations and destroyed the lives of many colleagues. But we have a mandate to build. To better the lives of people in need," Ban said.
Ban met President Muhammadu Buhari after the ceremony, congratulating Nigeria on staging free and fair elections and saying he recognised the country's "greater stability and peace" under its new leader.
"For the first time in Nigeria's history, a sitting president peacefully ceded power to an opposition candidate in a democratic election," he told a news conference after the meeting.
"The election sent a strong global message of respect for democracy and the rule of law."
Ban said he and Buhari had discussed development, human rights and peace and security, including "the troubling levels of violence and terror perpetrated by Boko Haram in northeastern Nigeria and beyond".
"I express my strong solidarity with the Nigerian people and government and with affected families and victims," he told reporters.
"I express my solidarity again with the Nigerian people -- and that the United Nations will work together in countering extremism and terrorism."
Ban arrived in Abuja on Sunday, just hours after the military revealed suspected Boko Haram fighters had ambushed a convoy carrying Nigeria's army chief-of-staff Lieutenant General Tukur Buratai.
The officer was unharmed but one soldier and 10 militants died in the ensuing firefight, in Faljari village, east of Borno State capital Maiduguri, according to army spokesman Sani Usman.
Boko Haram has stepped up its attacks in Borno and two neighbouring states in its northeastern heartland since Buhari came to power on May 29.
The Islamists have also carried out deadly ambushes across Nigeria's borders and in recent weeks suicide bombers, many of them women, have staged several attacks in Nigeria, Cameroon and Chad.
The fresh wave of violence has claimed more than 1,000 lives over the last three months, dealing a setback to a four-country offensive launched in February that had chalked up a number of victories against the jihadists.
An 8,700-strong Multi-National Joint Task Force, drawing in Nigeria, Niger, Chad, Cameroon and Benin, is expected to go into action soon.
Buhari has vowed to destroy Boko Haram, and replaced his military leaders earlier in August, ordering his new chiefs-of-staff to end the jihadist bloodshed within three months.
The military under his predecessor Goodluck Jonathan was heavily criticised for poor handling of the insurgency and its failure to free more than 200 schoolgirls abducted from the northeastern town of Chibok in April last year.
The "Bring Back Our Girls" campaign marks 500 days on Thursday since the girls were captured.
"I want to reiterate my support for the Chibok girls, and so many other innocent abducted girls and boys, whose names and fate remain unknown," Ban said.
"It is intolerable that their lives and schooling has been disrupted in this way. The whole world has been moved by their fate."