LONDON — The Northern Ireland government issued a formal apology on Friday to people who were abused in orphanages and children’s homes, telling them that “the state let you down.”

Ministers from all five political parties in the Northern Ireland Assembly read out apologies to survivors gathered at the Stormont government buildings near Belfast. Representatives of six institutions where abuse took place also publicly said sorry to those who were harmed.

“We neglected you, rejected you, we made you feel unwanted,” said Education Minister Michelle McIlveen, from the Democratic Unionist Party. “It was not your fault. The state let you down.”

The formal apology came more than five years after it was recommended by the Historical Institutional Abuse Inquiry. The years-long inquiry found shocking levels of physical, sexual and mental abuse at institutions run by the state, churches and charities between 1922, when Northern Ireland was founded as a state, and 1995.

Northern Ireland launched an investigation following similar work in the neighboring Republic of Ireland, where four state-funded investigations from 2004 to 2011 concluded that the Catholic Church engaged in systematic cover-up of child abuse by its officials for decades.

In Northern Ireland, a part of the United Kingdom with complex British Protestant and Irish Catholic divisions, abuse was recorded at institutions run by Catholic and Protestant religious groups and the Barnardo’s children’s charity.

Finance Minister Conor Murphy from Irish nationalist party Sinn Fein acknowledged that the apology was too long in coming.

“We should have protected you and we did not. We are sorry,” he said. “You were harmed by those who should have cared for you. We are sorry.

“You told the truth, yet you were not believed. We are sorry. We are responsible. And we are so very, very sorry.”

Northern Ireland is holding a separate inquiry into abuses at homes for unmarried mothers and their babies.