A nun in charge of a Catholic order has offered her "deepest and most sincere apologies" to anyone who may have been abused at Smyllum Park orphanage.

Sister Ellen Flynn said "horrifying" allegations of historical abuse said to have taken place at the Lanark care home are "totally against" everything that the order stands for.

The nun, who shed tears during her testimony, told the Scottish Child Abuse Inquiry her heart was with the survivors, as she vowed the order would engage with them and the probe to "put right what wrongs are found".

The pledge came as she and another witness admitted a variety of historical failures had taken place at the home, including "weak" governance and record-keeping.

The inquiry, sitting in Edinburgh, has heard evidence over several weeks about the institution, which shut its doors in 1981.

Dozens of former residents have testified they receiving beatings and were mistreated as children at the home, run by the nuns of the Daughters of Charity of St Vincent de Paul.

Giving evidence to the inquiry, Sister Ellen, the current head of the order, said: "For those who are in distress, for those whom we have hurt in any way, our deepest and most sincere apologies.

"If we can do something about it, let us know."

She and safeguarding head Sister Eileen Glancy, who gave evidence at the same time, earlier told the probe they wished to amend a previous apology issued because they realised that there was "more than a possibility that some abuse had occurred" at Smyllum.

Asked about those who say they continue to have emotional difficulties as a consequence of their time in the care of the religious order, Sister Ellen said: "The core of our being is to be there for vulnerable people in distress. I think the core of our being has been wrenched by some of the testimonies.

"We accompany people who suffer with long-lasting effects of things that have happened to them. So we feel the impact and for any child that has been abused whilst in our care we would feel the very, very deep sense of regret."

She described the contradictions in evidence between the survivors and the various nuns who described Smyllum as a "happy place" as "completely bewildering".

The witness also spoke of the order's "ingrained" values, in particular of serving the poor, and said: "There is a hugely long tradition around formation around how to behave with dignity and respect around children.

"So I find it really difficult to think that there was something systemic going on.

"I can't speak for the actions of individuals and I'm quite prepared to say that there's a possibility that many of the punishments occurred."

The witnesses also admitted the order did not properly engage with allegations of abuse when they first emerged in the late 1990s but said they now want to work with individuals or groups affected by their time at Smyllum.