CANBERRA, Australia (AP) — Australia's prime minister said on Thursday he will apologize to victims of child sex abuse in churches and other institutions over decades.

The apology follows a five-year government-commissioned inquiry into how institutions including schools, orphanages and sports clubs responded to sexual abuse of children in Australia over 90 years.

"On behalf of the nation, I will deliver that apology before the end of the year," Prime Minister Malcolm Turnbull told Parliament.

"As a nation, we must mark this occasion in a form that reflects the wishes of survivors and affords them the dignity to which they were entitled as children, but which was denied to them by the very people who were tasked with their care," he added.

A survivor-focused reference group would be appointed to advise on the form and content of the apology, he said.

The government has also urged states to sign on to a program to provide compensation to the victims from July. The federal government has been criticized by some survivors for proposing to deny compensation to abuse victims who grew up to become abusers or were convicted of serious crimes.

The inquiry made its final report in December after hearing testimonies from more than 8,000 survivors of child sex abuse.

Victims' advocates welcomed the apology as a first step.

Leonie Sheedy, chief executive of Care Leavers Australasia Network, which represents children raised in orphanages and foster homes, said institutions that allowed abuse should join the prime minister in apologizing.

"They should apologize to the nation as well. They had a duty of care to us and they failed miserably," Sheedy said.