Sri Lanka's president says country has not been able to unite the hearts and minds of ethnic groups despite ending a decades-old civil war five years ago.

In his Independence Day address Wednesday, President Maithripala Sirisena called on all political leaders to ask themselves what went wrong in the 67 years since independence from Britain.

The conciliatory speech was sharply different from the years since the civil war ended in 2009 when glorification of the military victory took center stage.

A "declaration of peace" was also read out paying respect to all ethnic groups killed in the civil war with a pledge not to allow violence to recur.