The United Nations has condemned Sri Lanka's government for failing to investigate civil war-era atrocities, suggesting the government was afraid of punishing soldiers who committed abuses during the conflict.

The world body had previously accused the Sri Lankan military of killing thousands of civilians, mostly ethnic Tamils, in the last weeks of a 26-year civil war that ended in 2009.

Government troops were accused of deliberately shelling civilians, hospitals, and blocking food and medical aid to hundreds of thousands of people boxed inside a tiny strip of land as the now-defeated Tamil Tiger rebels mounted their last stand.

"The consistent failure to effectively investigate, prosecute and punish serious crimes appears to reflect a broader reluctance or fear to take action against members of the security forces," Zeid Ra'ad al-Hussein, the UN High Commissioner for Human Rights, told the UN rights council on Wednesday.

"At the centre of all this are the victims," he said. "There can never be sustainable peace without justice for them."

WATCH: Maithripala Sirisena - No allegations of war crimes

Zeid and the council have repeatedly called for international judges to help investigate possible war crimes in efforts to guarantee impartiality.

But earlier this month, Sri Lankan President Maithripala Sirisena rejected the appeal, saying he would not "allow non-governmental organisations to dictate how to run my government", nor heed calls to "to prosecute my troops".

And although Sirisena's government agreed to the terms of an October 2015 UN resolution calling for an inquiry to be formed within 18 months, Sri Lanka has so far failed to begin an inquiry.

Zeid said any justice mechanism set up by Colombo would need foreign judges in order to be "credible".

Sirisena, a member of the majority Sinhalese community, received the support of the Tamil minority after promising accountability for abuses carried out by the largely Sinhalese military.

But Sri Lanka's main opposition Tamil party has accused Sirisena of failing to deliver on accountability.

According to the UN and independent watchdogs, as many as 40,000 Tamil civilians died in the last few months of the fighting.

In all, some 80,000 to 100,000 are believed to have died during civil war.