Following the UK’s historic vote to leave the European Union, a Daily Mail columnist has linked the decision to the legalisation of same-sex marriage.

Dominic Lawson – brother of TV chef Nigella – claims Britain would still be in the EU if David Cameron had not fought so hard for marriage equality, a move the soon-to-be ex-PM says he is most proud of.

Writing in his Daily Mail column, Lawson argued that many of the Conservative party MPs who opposed the Marriage (Same Sex Couples) Act 2013 were also its biggest Eurosceptics.

“If it were not for David Cameron’s decision to legalise marriage between people of the same sex – a measure I supported – Britain would not now be on her way out of the EU,” he says.

“The proposal, which had not been in the Tories’ 2010 election manifesto, was vehemently opposed by about half of his parliamentary party – who happened also to be the most Eurosceptic – and appalled countless members of local Conservative associations.”

Lawson writes that by pushing the legislation through, Cameron handed power over to Nigel Farage, who was – unsurprisingly – more than happy to exploit the situation for his own gains.

“I had lunch with UKIP’s leader at that time. I recall how gleeful he was at the way the gay marriage row was sending shire Tories in droves to switch to UKIP membership,” Lawson recalled.

“Though Farage himself is a libertarian, and definitely no moralist, he exploited this to the full.”

The columnist – who is also son of former Tory chancellor Nigel Lawson – adds that the EU referendum was offered in an attempt to win back possible UKIP defectors saying it “probably did appease the local Conservative associations”.

The Prime Minister listed same-sex marriage as one of his major achievements when announcing his resignation outside 10 Downing Street last week.