The Office of the Scottish Charity Regulator (OSCR) has upheld its previous ruling that warned a Catholic adoption agency to stop discriminating against gay people, by excluding them from becoming adopters, or lose its charitable status.
The ruling followed a complaint from the National Secular Society against St Margaret's Children and Family Care Society in Glasgow.
St Margaret's is partly funded by the Catholic Church and the trustees of the charity include bishops from dioceses in the west of Scotland.
St Margaret's decided not to accept the ruling and ask OSCR to review its decision.
OSCR complied and after reviewing said today (6 March) that it still finds that the charity discriminates unlawfully and confirmed its previous ruling, reported Scotland's TV channel STV.
A statement from the Scottish watchdog said: 'OSCR found that the charity does not provide public benefit because the way it provides benefit involves unlawful discrimination which causes detriment to the public and to particular groups of people, the effect of which outweighs the other positive effects of the charity's work.
'OSCR also found that access to the benefits the charity provides is unduly restricted.
'OSCR therefore found that the charity fails the charity test and confirmed the decision to direct the charity to meet the charity test'.
OSCR said that the Catholic charity has until April 22 to comply with the Equality Act or it could be removed from the register.
The charity now has the right to appeal to the Scottish Charities Appeal Panel.
The Scottish Government said it was 'disappointed' by OSCR's decision: 'The Scottish Government is disappointed at this decision. We have worked with St Margaret's to find a solution but the review process is a matter for OSCR to undertake independently.
'It is not for Scottish ministers to adjudicate on the law. There remain further appeals processes for St Margaret's to pursue, should the society so choose.
'Acting in the best interests of vulnerable children and young people remains our priority, and we will continue to support St Margaret's in their work towards meeting that aim.
'We do not believe it is in anyone's interests to close an organisation which provides such a valuable service to vulnerable children.
'The Scottish Government is committed to equality and protection from discrimination, and supports the Equality Act 2010'.
Alistair McBay, spokesman for the National Secular Society, welcomed the decision: 'We hope St Margaret's will now put the best interests of children first, as many other Catholic adoption agencies have done, and comply with the law by widening the pool of prospective parents to include same-sex couples.
'We hope that St Margaret's will look to St Andrews Children's Society in Edinburgh, which did change its criteria to comply with the law.
'Following Cardinal O'Brien stepping down as President, that society wisely decided to follow the law and is now flourishing.
'We call on the Scottish Government to reassess its position of support for St Margaret's in its attempts to circumvent the law'.
A spokesman for the charity said: 'We are disappointed at the decision. We will consult our lawyers before considering what course of action to pursue. In the meantime, St Margaret's remains open for business'.