SNP leader Alex Salmond has denied going “absolutely mental” at a Labour MP who asked him to comment on the gay marriage controversy.

He and Labour MP Thomas Docherty were visiting a Dunfermline school On Wednesday when Mr Docherty claims he asked the First Minister to make a statement on SNP MP Bill Walker’s “despicable” comments on gay marriage.

Mr Docherty told the Dunfermline Press that Mr Salmond had gone “absolutely mental” at him in a room at the new Carnegie Primary School.

In response, Mr Salmond’s special advisor Rosyth SNP councillor Douglas Chapman accused the Labour MP of “pure fiction” and said he was “the model of restraint” in the face of Mr Docherty’s “juvenile” and “aggressive” behaviour.

He said: “I was in the room along with guests and senior council officers and nothing untoward happened, other than Mr Docherty’s approach was totally inappropriate given that the focus of the visit was making children feel really proud of their new school.”

Mr Docherty responded: “If Douglas Chapman’s happy putting his name to this statement for Mr Salmond that’s fair enough but he was in the room and he knows what really happened.”

Mr Walker, the MP for Dunfermline, recently signed a motion stating that no one should be “forced to be involved with” gay marriages.

Last week, he hit out at gay rights campaigners who called him bigoted, accusing them of “intimidating” him.