COLOMBO, Sri Lanka — U.N. Secretary-General Ban Ki-moon said Friday the world body has failed to protect civilians in conflicts despite repeated commitments, and the killings at the end of Sri Lanka’s civil war seven years ago prompted him to launch an initiative to focus early attention on human rights violations.

While Sri Lankans are engaging in a process of reckoning and reconciliation, the U.N. has engaged in “self-scrutiny,” Ban said in a speech to a foreign relations think tank as part of a three-day visit to Sri Lanka.

He said that had the U.N been more active during Sri Lanka’s civil war, many lives could have been saved.

“Sri Lanka has taught us many important lessons . (and) you have also made serious problems among your people,” Ban said, adding that the U.N. made “big mistakes” during the critical last several months of the civil war.

An experts’ panel appointed by Ban had reported that up to 40,000 ethnic Tamil civilians may have been killed largely due to shelling by government troops in the final months of the fighting, which ended in May 2009 with the defeat of the rebel Tamil Tigers.

The rebels had been fighting for an independent state for the ethnic Tamil minority complaining of systematic marginalization by successive governments controlled by majority Sinhalese.

Both sides were accused of serious human rights violations in the absence of independent witnesses after the government evicted aid workers and the U.N.

“On the part of the United Nations, I established internal investigations into what had happened, what our people in the United Nations mission here had been doing at that time. We found serious mistakes, inactivities. Had we been more actively engaged, we could have saved many more human lives,” he said.

Ban said Sri Lanka was only the latest of a series of U.N. failures in past years, including the 1994 genocide in Rwanda for which the U.N. “felt responsible.”

“It happened just one year after in Srebrenica, again many people were massacred when they were not fully protected by U.N peacekeeping operations. We repeated again, never again; how many times we should repeat never, never again. We did it again in Sri Lanka,” he said.

Ban said his 2013 initiative Human Righst Upfront followed an introspection of the events in Sri Lanka. The program aims to focus early attention on human rights before they escalate.

“Peace and security, development human rights, they are all interlinked, nothing is more important than the other,” Ban said. “But I decided that in all our operations, thinking and planning the human rights aspect should be up front.”

Since the end of Sri Lanka’s civil war, Ban has been proactive in calling for accountability for rights violations.

During his stay, Ban met with government leaders and discussed progress in reconciliation and accountability processes. On Friday he travelled to the former conflict zone in the north, met Tamil leaders and visited villagers were people displaced by war have been resettled.

Hundreds of protesters gathered in the northern town of Jaffna demanding Ban’s attention in locating thousands of missing persons, the return of private lands occupied by the military and involving foreign prosecutors and judges in probing allegations of war crimes.

The Sri Lankan government has said that it will not involve foreign judges.

In his speech in Colombo, Ban urged the government to fast track returning private lands and reduce the size of the military in the former conflict zone to ease tensions and help peace making.

Ban told reporters at the end of his visit that the government has made progress in advancing peace and reconciliation and asked Sri Lankans to move on from the past.

“Reconciliation asks all of you to do something almost unimaginable. It asks you to overcome all the harm done, the torture, the murders and extra-judicial executions, the suicide bombings the disappearances and forces recruitment, suffering and violence, to transcend your grief and pain,” he said.