Witnesses who gave evidence of abuse they suffered while in residential childcare have been praised for their "candour and courage".

Lawyers for Quarriers, Aberlour and Barnardo's made the comments during closing statements of the current phase of Scottish Child Abuse Inquiry on Tuesday.

The inquiry has heard witnesses describe routine beatings, emotional abuse and sexual assaults. Some former care residents still bear physical and mental scars decades after the abuse.

All three organisations offered apologies to those who suffered while in their care.

Kate Dowdalls QC, representing Quarriers, said: "During this case study, former Quarriers residents have come forward to describe events that are deeply personal and often distressing.

"Quarriers is grateful to them for their candour and courage.

"It's important for those who provided residential care in the past and those who do so know to learn from the mistakes of the past to improve services in the future."

Gordon Jackson QC, representing Barnardo's, said: "Let me say from the outset, on behalf of Barnardo's, their desire to recognise and respect the evidence we have heard from all applicants who were formerly in their care.

"They have shown great courage in coming to the inquiry at all, even more giving evidence in public."

Steven Love QC said Aberlour's staff had been "touched by the distress of survivors coming forward and their dignity" when giving evidence.

In Care Abuse Survivors (INCAS) lawyer John Scott QC pointed to "patterns of abuse" that occurred in the establishments, saying children not being given gifts at birthdays is an example of an "accepted institutional policy and practice, if not in writing".

He added: "What happened did not involve one or two abusers; it involved many abusers and took place over considerable decades."

Stuart Gale QC, representing survivors' group Former Boys and Girls Abused of Quarriers Homes (FBGA), described the scale of abused suffered by residents as "disturbingly high", with humiliation and ridicule being "particularly repellent".

Mr Jackson tried to explain that sexual abuse could have gone undetected in Barnardo's establishments because such offences were seen as unthinkable.

He said: "The thought that fellow staff members might have been behaving in these ways was simply not contemplated.

"Even when there were suspicions, there was reluctance to give voice to it.

"It was partially because the whole idea was so unthinkable that it was very difficult to face up to."

The proceedings brought an end to the latest phase of the inquiry, relating to residential child care establishments run by non-religious and voluntary organisations.

The inquiry, before judge Lady Smith, continues in March.