The Scottish National Party and the Catholic Church worked together secretly in order to avoid new legislation requiring religious adoption agencies to help gay couples, it has been reported.

According to the Sunday Herald, education secretary Fiona Hyslop lobbied Whitehall for Catholic adoption agencies to get an “indefinite” exemption from the landmark legislation.

She then told the Church she was “comfortable” with plans by a Glasgow-based Catholic adoption service to refuse gay couples.

Correspondence obtained by the newspaper showed how Hyslop attempted to avoid the equality legislation.

During a 2007 meeting between Hyslop and Cardinal Keith O’Brien, notes said: “The Scottish government position – as she had made clear in speaking to Whitehall – was that it would have been better for the exemption to end 2008 to have been made indefinite.”

She also met with St Margaret’s Children and Family Care Society, a Catholic adoption agency, in order to discuss how the organisation could change its constitution to be allowed to serve only heterosexuals.

The rewording would have allowed the charity to take advantage of a loophole in the Sexual Orientation Regulations (SOR) and avoid having to offer services to gay couples.

The note of the meeting said: “It would then enable the Society to use the exemption under Reg. 18 of the SOR to provide services only to persons of a particular sexual orientation. If a same- sex couple applies to the Society, the couple would be directed to an appropriate agency. A service would not be provided by the Society to a same sex couple.”

Hyslop was recorded as being pleased with the plans.

A spokesman for Hyslop said: “The Scottish government has always said that Catholic adoption agencies should be able to operate within the teachings of the church. That is a matter of public record, and we have made this view known to UK ministers and the Church itself.

“We understand that St Margaret’s have successfully applied to the Office of the Scottish Charities Regulator for a change in their constitution, and will therefore be referring same-sex couples to other adoption agencies for assessment. That is a decision for the agency and the regulator.”