SYDNEY, Australia — Australia sought to atone for a decades-long epidemic of child sexual abuse on Monday, as Prime Minister Scott Morrison issued an official apology that acknowledged the government’s systemic failures to protect the nation’s children.

The apology, delivered to a gathering of victims in Canberra, the nation’s capital, was the culmination of a five-year government inquiry that exposed widespread sexual abuse. The investigation was perhaps the most far-reaching inquiry of its kind undertaken by any country, examining abuse across a range of religious and secular institutions. Investigators found that thousands of children were sexually abused and countless instances of accusations were ignored or covered up.

“We are sorry,” Mr. Morrison said in the Great Hall of Parliament, as victims, advocates and officials held hands.

“Sorry you are not protected,” he said. “Sorry you are not listened to. We are sorry for refusing to trust the words of children, for not believing you. As we say sorry, we also say we believe you.”