Scottish Executive ministers at the start of the millennium believed that appealing to the "innate common sense of the public" would be key to achieving their plans to scrap the controversial section 28 law, newly-declassified documents have suggested.

A series of previously-confidential papers reveals how the then cabinet of the Labour/Lib Dem coalition at Holyrood felt it had to take decisive action to move the debate away from "hysterical" and "extremely damaging" coverage of its proposals to repeal the law which banned the promotion of homosexuality in schools.

And they outline ministers' fears from the time that the "highly vocal" campaign to maintain the status quo could impact upon the Executive's wider social policy agenda.

The law, which was part of the Local Government Act 1988, stipulated that local authorities should "not intentionally promote homosexuality" or "promote the teaching in any maintained school of the acceptability of homosexuality as a pretended family relationship''.

It was repealed by the Scottish Parliament in June 2000 following a heated campaign from both sides of the argument in what was commonly known as the "section 28" or "clause 2A" debate.

Documents just released by National Records of Scotland under the 15-year rule chart the then Scottish cabinet's evolving approaches to the issue from late 1999 onwards in the face of strong opposition from some quarters.

Minutes from a cabinet meeting on January 18, 2000 show how there was believed to be a "rough balance" between members of the public in favour and against the plans to abolish the law. It was proposed during the meeting that ministers take a "non-provocative stance" on the issue.

But just one week later, first minister Donald Dewar noted the "increasingly hysterical tone of the media coverage" of the issue, further minutes record.

"The key was to find a way of appealing to the innate commonsense (sic) of the Scottish public. Parents should be reassured by the safeguards proposed and the knowledge that if they had concern about a teacher's behaviour or material being used in schools, they could take action."

The minutes went on: "There was a risk that a wider agenda could emerge from the campaign, attacking social policies on matter such as health promotion, family law reform and social inclusion... The possible impact of the current campaign on the wider social policy agenda should be kept under close review."

MSPs passed the Marriage and Civil Partnership (Scotland) Bill in February 2014, making Scotland the 17th country in the world to legalise same-sex ceremonies.