The Robertson Trust has apologised and agreed to pay compensation after it blocked two Christian groups from using its conference centre.
Legal action was brought against the charitable trust, which is one of Scotland's leading grant-giving organisations, earlier this year.
It came about after Stirling Free Church and the Billy Graham Evangelistic Association were stopped from using the Barracks conference centre in Stirling.
The group's claimed they were targeted because of their traditional Christian views on homosexuality.
The Robertson Trust initially rejected the claim, stating that the block was simply down to a policy which prevented the promotion of any religious belief.
The legal action was supported by campaign group the Christian Institute who claimed that the blocking of bookings by Christian groups by 'neutral' organisations set a worrying precedent.
This week, the Robertson Trust backed down and agreed to pay £20,000 to prevent the legal action at Glasgow Sheriff Court continuing.
In a statement, Mark Batho, chair of the board of trustees said: "The Robertson Trust is committed to advancing equality and diversity for everyone living in Scotland. As well as fostering a respectful and welcoming community within the Trust, we are guided by our values in how we work in partnership with organisations from across the sector.
"The Trust's long standing funding policy legitimately states that we do not fund or support the promotion of any particular religious or political beliefs. We recognise that in applying our funding policy to the hire of our facilities, which are available at substantially subsidised rates to charities and community groups, we inadvertently breached the Equality Act 2010."
Welcoming the apology and settlement, Iain Macaskill, the minister of Stirling Free Church, said: "It has been a long time coming but finally justice has been done. Our legal action was never about financial compensation. It was about the principle.
"It is against the law to advertise a venue as being available to all-comers but then cancel the contract simply because the booking is for a religious event.
"Christians have the same legal rights as everyone else and the outcome of this case affirms that. The Trust has accepted that they broke the law and they have apologised to us. We are grateful and relieved."
The settlement comes just months after an employment tribunal ruled that the Robertson Trust's former CEO, Kenneth Ferguson, was the victim of religious discrimination and unfair dismissal by the Trust and its chair, Shonaig Macpherson, when he was sacked in 2020.