Ex-Liberal Democrat leader Tim Farron has apologised for missing a knife-edge Brexit vote to give a speech billed as an address on the controversy over his beliefs on gay sex.

Mr Farron, a committed Christian, faced repeated questions over his attitude to homosexuality during the general election campaign last year, which overshadowed the party’s attempts to win back voters by capitalising on anger among pro-Europeans.

Pro-EU MPs hit out at Mr Farron when it emerged that he had missed a series of votes during a dramatic night in the Commons, where Theresa May narrowly saw off a backbench rebellion to a key piece of Brexit legislation.

Mr Farron apologised for attending the event at Sherborne Abbey, in Dorset, entitled ”Illiberal Truths” on Monday night, saying the party had expected Labour to abstain so he had been granted permission to conduct a longstanding engagement.

The event description said: “Tim Farron MP made the headlines during the 2017 general election campaign as leader of the Liberal Democrat party, although it was not, in fact, politics that generated the headlines but repeated attempts by the mainstream media to get him to express an opinion on whether gay sex was compatible with Christian faith.

“He announced he would step down as party leader following the election, stating that he had become “torn between living as a faithful Christian and serving as a political leader”.

“Many hold strong opinions on the issue but it raised an even more important question: What happens when my truth is not yours?”

The well-attended event was described as a “wide-ranging lecture on values and contemporary society”, which did not feature questions on homosexuality or Mr Farron’s resignation, according to attendees.

Mr Farron said in a statement: “I was authorised to be absent due to a pre-arranged engagement away from the parliamentary estate.

“In the end nobody expected the vote to be as close as it was – I’d actually cancelled the engagement earlier on, but then un-cancelled because we expected Labour to abstain and the government to win by miles.

“We clearly called it wrong, as did Labour. I take full responsibility for my part. The Tories don’t deserve any luck, I’m so sorry I inadvertently granted them some.”

Lib Dem leader Sir Vince Cable also missed the votes to attend a meeting off the parliamentary estate, sources confirmed.

A party source told The Independent: “Vince had an important meeting off the parliamentary estate, which had been sanctioned by the whips long before these amendments were up for the vote.

“The Chequers compromise is unworkable. It is still unworkable with the amendments last night.”

Pro-EU MP Jo Stevens, who quit the Labour front bench over Article 50, posted on Twitter: ”Was this the reason why the former #LibDem leader was absent from crucial #Brexit votes last night?

“Giving a £5 lecture on how you can’t be a gay Christian?”

Aberavon MP Stephen Kinnock tweeted: “Last night two Brextremist-driven amendments were carried by a whisker – 3 and 4 votes, respectively. 14 Tories rebelled.

“Tim Farron and Vince Cable (those doughty, fearless crusaders against a hard Brexit) didn’t vote.”

And shadow justice secretary Richard Burgon added: “Journalists reporting current Lib Dem Leader Vince Cable and last Lib Dem Leader Tim Farron didn’t vote in one of tonight’s votes in which Tory Government only survived by 3 votes.

“Last week they brought a motion to get in to Government with the Tories. #NeverTrustTheLibDems.”

Mr Farron resigned as leader of the Liberal Democrats last year following a long-running row over his views.

In a statement at the time, Mr Farron said: “I seem to be the subject of suspicion because of what I believe and who my faith is in.

“In which case we are kidding ourselves if we think we yet live in a tolerant, liberal society. That’s why I have chosen to step down as leader of the Liberal Democrats.”

He said that from the “very first day” of his leadership he had faced questions about his Christian faith and that he had tried to answer with “grace and patience”, adding: “Sometimes my answers could have been wiser.”

People's Vote march – demanding vote on final Brexit deal Show all 30 1 /30 People's Vote march – demanding vote on final Brexit deal People's Vote march – demanding vote on final Brexit deal Mandatory Credit: Photo by Guy Bell/REX (9725259aq) Marching down Whitehall - People's March for a People's Vote on the final Brexit deal. Timed to coincide with the second anniversary of the 2016 referendum it is organised by anti Brexit, pro EU campaigners. People's March for a People's Vote, London, UK - 23 Jun 2018 Guy Bell/REX Rex People's Vote march – demanding vote on final Brexit deal Demonstrators carry banners and flags as they participate in the People's March demanding a People's Vote on the final Brexit deal, in central London on June 23, 2018, the second anniversary of the 2016 referendum. Tens of thousands of people demonstrated in London on Saturday calling for a second vote on Britain's departure from the European Union. / AFP PHOTO / Niklas HALLE'NNIKLAS HALLE'N/AFP/Getty Images NIKLAS HALLE'N AFP/Getty Images People's Vote march – demanding vote on final Brexit deal A young protestor shouts as she takes part in the People's Vote demonstration against Brexit Getty Images People's Vote march – demanding vote on final Brexit deal A woman holds a placard as she joins EU supporters, calling on the government to give Britons a vote on the final Brexit deal, participating in the 'People's Vote' march in central London, Britain June 23, 2018. REUTERS/Henry Nicholls HENRY NICHOLLS Reuters People's Vote march – demanding vote on final Brexit deal epa06833888 Pro-EU demonstrators take part in a People's March anti-Brexit rally in Parliament Square in London, Britain, 23 June 2018. Protesters are calling for a referendum on the final deal. The protest is taking place on the second anniversary of the Brexit referendum. EPA/ANDY RAIN ANDY RAIN EPA People's Vote march – demanding vote on final Brexit deal A protester's pro-EU t-shirt EPA People's Vote march – demanding vote on final Brexit deal epa06833892 A pro-EU demonstrator waves a European Flag during a People's March anti-Brexit rally in Parliament Square in London, Britain, 23 June 2018. Protesters are calling for a referendum on the final deal. The protest is taking place on the second anniversary of the Brexit referendum. EPA/ANDY RAIN ANDY RAIN EPA People's Vote march – demanding vote on final Brexit deal Demonstrators carry banners and flags as they participate in the People's March demanding a People's Vote on the final Brexit deal, in central London on June 23, 2018, the second anniversary of the 2016 referendum. Tens of thousands of people demonstrated in London on Saturday calling for a second vote on Britain's departure from the European Union. / AFP PHOTO / Niklas HALLE'NNIKLAS HALLE'N/AFP/Getty Images NIKLAS HALLE'N AFP/Getty Images People's Vote march – demanding vote on final Brexit deal epa06833960 Tens of thousands of people march through London during a People's March anti-Brexit demonstration in London, Britain, 23 June 2018. Protesters are calling for a referendum on the final deal. The protest is taking place on the second anniversary of the Brexit referendum. EPA/ANDY RAIN ANDY RAIN EPA People's Vote march – demanding vote on final Brexit deal Leader of the Liberal Democrats, Vince Cable speaks during the People's March demanding a People's Vote on the final Brexit deal, in central London on June 23, 2018, the second anniversary of the 2016 referendum. Tens of thousands of people demonstrated in London on Saturday calling for a second vote on Britain's departure from the European Union. / AFP PHOTO / Niklas HALLE'NNIKLAS HALLE'N/AFP/Getty Images NIKLAS HALLE'N AFP/Getty People's Vote march – demanding vote on final Brexit deal epa06833964 A young pro-EU demonstrator takes part in a People's March anti-Brexit rally in Parliament Square in London, Britain, 23 June 2018. Protesters are calling for a referendum on the final deal. The protest is taking place on the second anniversary of the Brexit referendum. EPA/ANDY RAIN ANDY RAIN EPA People's Vote march – demanding vote on final Brexit deal Gina Miller and Caroline Lucas EPA People's Vote march – demanding vote on final Brexit deal epa06834044 Tens of thousands of people march through London during a People's March anti-Brexit demonstration, in London, Britain, 23 June 2018. Protesters are calling for a referendum on the final deal. The protest is taking place on the second anniversary of the Brexit referendum. EPA/ANDY RAIN ANDY RAIN EPA People's Vote march – demanding vote on final Brexit deal epa06833264 Thousands of people march through London during a People's March anti Brexit demonstration in London, Britain, 23 June 2018. Protesters are calling for a referendum on the final deal. The protest is taking place on the second anniversary of the Brexit referendum. EPA/ANDY RAIN ANDY RAIN EPA People's Vote march – demanding vote on final Brexit deal Tens of thousands of people march through London EPA People's Vote march – demanding vote on final Brexit deal epa06833265 Thousands of people march through London during a People's March anti Brexit demonstration in London, Britain, 23 June 2018. Protesters are calling for a referendum on the final deal. The protest is taking place on the second anniversary of the Brexit referendum. EPA/ANDY RAIN ANDY RAIN EPA People's Vote march – demanding vote on final Brexit deal Demonstrators at the People's Vote March Getty People's Vote march – demanding vote on final Brexit deal 'Two months too young to decide on my future' REUTERS People's Vote march – demanding vote on final Brexit deal Crowds taking part in the People's Vote march for a second EU referendum at Trafalgar Square in central London. PRESS ASSOCIATION Photo. Picture date: Saturday June 23, 2018. See PA story POLITICS Brexit. Photo credit should read: John Stillwell/PA Wire John Stillwell PA People's Vote march – demanding vote on final Brexit deal A young girl joins in the march PA People's Vote march – demanding vote on final Brexit deal An EU flag is draped across the statue of Winston Chruchill in Parliament Square REUTERS People's Vote march – demanding vote on final Brexit deal Demonstrators gather prior to the start of the People's March demanding a People's Vote on the final Brexit deal, in central London on June 23, 2018, on the second anniversary of the 2016 referendum. / AFP PHOTO / Niklas HALLE'NNIKLAS HALLE'N/AFP/Getty Images NIKLAS HALLE'N AFP/Getty Images People's Vote march – demanding vote on final Brexit deal Vince Cable MP, Pro-EU campaigner Gina Miller, Tony Robinson and Caroline Lucas MP join with crowds PA People's Vote march – demanding vote on final Brexit deal Crowds gather on Pall Mall in central London, during the People's Vote march for a second EU referendum. PRESS ASSOCIATION Photo. Picture date: Saturday June 23, 2018. See PA story POLITICS Brexit. Photo credit should read: John Stillwell/PA Wire John Stillwell PA People's Vote march – demanding vote on final Brexit deal Crowds gather on Pall Mall PA People's Vote march – demanding vote on final Brexit deal A man resembling Britain's Foreign Secretary Boris Johnson, joins EU supporters Reuters People's Vote march – demanding vote on final Brexit deal EU supporters, calling on the government to give Britons a vote on the final Brexit deal, participate in the 'People's Vote' march in central London, Britain June 23, 2018. REUTERS/Henry Nicholls HENRY NICHOLLS Reuters People's Vote march – demanding vote on final Brexit deal People gather in Trafalgar Square REUTERS People's Vote march – demanding vote on final Brexit deal Pro-EU campaigner Gina Miller and Tony Robinson PA People's Vote march – demanding vote on final Brexit deal EU supporters, calling on the government to give Britons a vote on the final Brexit deal, participate in the 'People's Vote' march REUTERS

It comes as Ms May faced the biggest rebellion of her premiership on Monday night, as 14 Tory rebels voted against Eurosceptic clause that would prevent the UK collecting tariffs on behalf of the EU unless it agreed to do the same.