Two Catholic charities have objected to the choice of chairwoman for Scotland's public inquiry into historical cases of child abuse.
The Congregation of the Poor Sisters of Nazareth and the Daughters of Charity of St Vincent De Paul have lodged a petition for judicial review.
They raised the issue of bias over the appointment of Susan O'Brien QC, who has acted in a case against them.
The charities' petition will be heard at the Court of Session in Edinburgh.
The government said it would "robustly" defend the appointment, while some victims called the legal move "disappointing" and "outrageous".
The action centres on Ms O'Brien's involvement in a case brought by two former residents of Nazareth House children's home in Glasgow.
The alleged they were abused in the 1960s and 70s.
Ms O'Brien acted as counsel for the former residents in their 2008 appeal to the House of Lords which unsuccessfully challenged a court ruling that the claims were made too late.
Alastair Duncan QC, representing the charities, told the Court of Session: "The particular concern that my clients have is that Ms O'Brien had acted for individuals alleging abuse against them, that she had supported the allegations that were made by appearing as counsel for those individuals and that she is now being asked to adjudicate on the very same issues."
Mr Duncan said the allegations that arose in the House of Lords case were "almost certain" to be heard again at the public inquiry.
He told judge Lord Woolman that Ms O'Brien had acted in a number of other cases in connection with allegations of historical abuse.
Mr Duncan said the legal challenge was founded on an "apparent bias" rather than any assertion that she was actually biased against the charities.
Ms O'Brien's appointment was announced by Education Secretary Angela Constance last month.
She is due to take up her post on 1 July.
Her remit will include allegations of abuse in institutions, foster care, long-term hospital care and boarding schools.
Lord Woolman has reserved judgment on the case.
A Scottish government spokeswoman said Ms O'Brien's appointment had been received "positively" by many people, including survivors.
She added: "She is an experienced advocate whose considerable knowledge and expertise was an important consideration in making this appointment.
"We are confident that her appointment is sound in terms of the Inquiries Act and that she will lead a fair, thorough and honest inquiry."
A spokesman for the support group In Care Abuse Survivors (Incas) branded the court application by the charities "outrageous".
Alan Draper, the group's parliamentary liaison officer, said: "These are the very organisations who will have questions to answer when it comes to the inquiry.
"These organisations and the Catholic hierarchy have a track record of doing all in their power to prevent victims achieving justice.
"We are pleased that this application indicates what has been the real agenda of the Catholic hierarchy - that is to use every tactic possible to prevent victims achieving justice."
When Education Secretary Angela Constance announced Ms O'Brien's appointment, she said the inquiry would have powers to force witnesses to give evidence.
Ms Constance had previously said abusers would "face the full force of the law".
Ms O'Brien has been an employment judge for 15 years and is currently a governor of Heriot-Watt University.
At the time of her appointment, she said: "I appreciate that no one can provide full justice for any victim of abuse in childhood, but the Scottish government is anxious to enable victims to tell us what happened to them and the impact it had on their lives."
"The inquiry panel will try to identify any lessons from past failures which will help to keep our children safe in the future."