A Catholic adoption agency based in Glasgow has won an appeal against a ruling which removed its charitable status as it refused to consider same-sex parents.

In January 2013, the Scottish adoption charity St Margaret’s Children and Family Care Society, was warned that if it did not start accepting applications from gay couples it would lose its charity status.

The ruling that St Margaret’s had unlawfully discriminated against gay and lesbian couples was in March upheld by the Office of the Scottish Charity Regulator, as it was deemed to have broken the Equality Act 2010.

It was given until 22 April 2013 to comply, or be removed from the charitable register, an order which it refused to comply with.

St Margaret’s policy states that “We expect applicants to have been married for at least two years”.

The Scottish Charity Appeals Panel this week overturned the original decision to remove its charitable status.

The Catholic Church, which runs and partly funds the agency, has said work would continue as normal.

After the announcement that the decision had been reversed, a spokesperson for the charity, said: “We are delighted and relieved that the threat hanging over us has been lifted.

“Our only wish is to continue to do the good work for which we have been recognised by the authorities, of placing children in need of families with loving parents.”

The president of St Margaret’s, Archbishop Philip Tartaglia, said: “We are grateful for this wise decision. It means that families who are ready to adopt can look forward to the future with a little more serenity, and children in great need can be placed into loving homes.

“St Margaret’s is a small agency which does great work for the wider community and helps transform the lives of some of the most vulnerable children in society. It would have been have been a great pity if it had been forced to close.”

The chairman of St Margaret’s Children and Family Care Society, last year described the raising of children by gay couples “a terrible social experiment”.