The death toll in the terrorist bombing in the Algerian capital went up to 17 on Friday.
U.N. deputy spokeswoman Marie Okabe announced the new death toll and said the United Nations did not know of any others still missing in the rubble of U.N. buildings in Algiers.
Rescue workers called off the search for survivors Friday and Algeria's Interior Ministry put the official death toll in the bombing at the U.N. offices and an Algerian government building at 37. Al-Qaida's self-styled North African branch claimed responsibility for Tuesday's near simultaneous attacks.
"I stand with the people of Algeria and the wider region in the face of the scourge of terrorism," Ban said in a statement. "This was an attack not only against the United Nations, not only against Algerians, but against humankind itself."
Ban said "words cannot begin to do justice to the grief I feel" about the high U.N. death toll, adding that "a devastatingly high number of innocent Algerians have also perished, as well as nationals from other countries."
"Those who target innocent civilians in this way commit an unspeakable crime," he said. "Terrorism is never justifiable, on any grounds... It hurts all nations - large and small, rich and poor. It takes its toll on human beings of every age and income, culture and religion."
The bombing was the worst attack against U.N. staffers since an August 2003 bombing at the world body's headquarters in Baghdad killed the top U.N. envoy in Iraq, Sergio Vieira de Mello, and 21 others.
Former Secretary-General Kofi Annan pulled all U.N. international staff out of Iraq two months later following a second bombing at U.N. headquarters in Baghdad and a number of attacks on humanitarian workers. He allowed a small U.N. contingent to return to Baghdad in August 2004, but the number has remained low since then - currently 65 - because of security concerns.
Ban told the U.N. General Assembly Wednesday in a live video address from Bali, Indonesia, where he was attending the U.N. conference on climate change, that the United Nations will remain in Algeria.
"I will spare no effort in ensuring that the United Nations provides adequate security for its staff, wherever they serve," the secretary-general said in Friday's statement. "I will look at all possible ways, with all parts of the system, and with member states, to ensure that this is done."
Ban said he asked all U.N. staff worldwide to observe a minute of silence to honor those who lost their lives in Algeria at 10 a.m. EST (1500 GMT) on Monday.