A former resident of children's homes in Northern Ireland and the Republic of Ireland has compared them to Nazi concentration camps or Russian gulags.

The 62-year-old Co Donegal native told Northern Ireland's Historical Abuse Inquiry that he was sexually assaulted by a woman when he was aged five or six.

The man was a resident at St Joseph's Home in Termonbacca in Derry, which was run by the Nazareth order of nuns.

He told the inquiry he did not know whether the woman was a lay member of staff or a nun.

The man said he and his brother were later transferred to an Industrial School in Galway run by the Christian Brothers.

"Essentially a gulag, a child's prison," he stated.

"The comparison was two hell holes. Which is better?

"It is difficult to describe when things are bad, you are on a race to the bottom. Salthill (Galway) was Auschwitz, Termonbacca was Treblinka."

The man said he sometimes attended a school run by the nuns at Bishop Street in Derry and three of his sisters, now dead, may have been in class with him, but he was never told of their family links.

Describing life at the Termonbacca home, he said children were labour and praying machines. 

He recalled the routine of polishing floors when the children linked arm-in-arm, with rags under their feet and had a song River Flow and River Back.

He also told the inquiry that in Termonbacca he sometimes got thumped and kicked, but he got off lightly, compared to some of the other children.  

He also told the inquiry that the nuns used to bath the children in Jeyes fluid.

He claimed: "It was kind of like a Zyklon B gas chamber."

The alleged abuse happened in the 1950s and 60s. 

He spoke of the atmosphere where the children were often told they were "a tinker", "born on the side of the road", "your father didn't want you".

The man said there were staff in the home who did good things and said: "How did they survive in a sea of evil ... they were survivors too."

The man, who wishes to remain anonymous, served for a number of years in the Irish Army and now lives with his partner and children in Sweden. 

He said he hopes the inquiry will put in place stringent legislation for the protection of children because "the type of children we were are still around today".

The man said compensation should come from the (religious) orders and the taxpayer should not be burdened with this. 

In relation to Northern Ireland society, he said everybody is making a journey, not just the children.

In his closing remarks, he said: "If you can't take it, don't ask the questions. If you can take the answers, we can talk."

The treatment of children in church-run residential homes is a key concern of the investigation being held in Banbridge, Co Down.

It is chaired by retired judge Sir Anthony Hart and is considering cases between 1922 and 1995.

The Nazareth order has already issued a public apology.

Public hearings are due to finish in June 2015, with the inquiry team to report to Stormont's power-sharing executive by the start of 2016.