Ireland’s government will issue a formal state apology to tens of thousands of women and children who suffered harsh treatment in church and local authority homes for unmarried mothers after an inquiry found “appalling” levels of infant mortality in the institutions.

In a voluminous report published on Tuesday that cast light on some of the darkest aspects of recent history of the Catholic church in Ireland, the judge-led panel that examined the operation of the homes in the last century said 9,000 children died — a mortality rate of about 15 per cent.

Women were admitted to the homes because they failed to secure the support of their family and the father of their child after becoming pregnant, the inquiry found. The harsh treatment they received was “supported by, contributed to, and condoned by” institutions of the state and churches.

There were about 56,000 unmarried mothers and about 57,000 children in the church-run mother and baby homes and local authority county homes under investigation, with the greatest number of admissions in the 1960s and early 1970s. Another 25,000 unmarried mothers and a larger number of children were in separate county homes which were not investigated.

The church homes run by mainly Catholic religious orders reflected the former dominance in Irish society of the once-powerful church, whose influence has waned considerably after decades of scandal over clerical child abuse.

“The death rate among ‘illegitimate’ children was always considerably higher than that among ‘legitimate’ children, but it was higher still in mother and baby homes: in the years 1945-46, the death rate among infants in mother and baby homes was almost twice that of the national average for ‘illegitimate’ children,” the report said.

“In the years before 1960 mother and baby homes did not save the lives of ‘illegitimate’ children; in fact, they appear to have significantly reduced their prospects of survival.”

It added: “There is no evidence of public concern being expressed about conditions in mother and baby homes or about the appalling mortality among the children born in these homes even though many of the facts were in the public domain.”

The six-year inquiry followed the disclosure in 2014 by Catherine Corless, a historian, that there was a burial record for only a single child in one county Galway home even though her examination of death certificates established that 796 children died.

Investigators later found that a “large number” of the deceased children were buried in an underground structure within a decommissioned sewage tank.

Micheál Martin, the prime minister, said the inquiry opened a window into a “deeply misogynistic culture” over several decades in which unwed mothers and their children faced “shame and stigma” through no fault of their own.

“What was very striking was the absence of basic kindness,” said Mr Martin, adding that many ended up in the homes because of “extraordinary and oppressive societal pressure” against motherhood outside marriage. Society at large embraced a “perverse religious morality”, the Taoiseach said.

The inquiry said many women who became pregnant outside marriage were forced to leave home and seek a place where they could stay without having to pay. While there was no evidence that women were forced to enter mother and baby homes by church or state authorities, most had no alternative.

“Many were destitute. Women who feared the consequences of their pregnancy becoming known to their family and neighbours entered mother and baby homes to protect their privacy.”

The proportion of Irish unmarried mothers who were in mother and baby homes was the world’s highest, the inquiry said. “In 1967 the number of babies who were adopted in Ireland was equal to 97 per cent of the ‘illegitimate’ births; this was the highest in the world.”

Mr Martin, who will make an apology in parliament on Wednesday, said all of Irish society was complicit and that the report presents profound questions.

“The regime described in the report wasn’t imposed on us by any foreign power. We did this to ourselves as a society. We treated women exceptionally badly. We treated children exceptionally badly,” he said.

“We had a completely warped attitude to sexuality and intimacy and young mothers and their sons and daughters were forced to pay a terrible price for that dysfunction.”