An MP who is on maternity leave has accused the government of a breach of trust over a key House of Commons vote on Brexit.

Lib Dem Jo Swinson was "paired" with Tory chairman Brandon Lewis so she could be at home with her baby son during the Trade Bill vote.

This should mean neither MP votes so their absences cancel each other out.

But Mr Lewis did vote with the government - he has since apologised for an "honest mistake" by whips.

Cabinet Office minister David Lidington, a key ally of Theresa May, also apologised, telling BBC Radio 4's Today that it was a "genuine mess-up" on his party's behalf which "clearly should not have happened".

The row blew up after voting had taken place on the Trade Bill, where the main battleground was an amendment to do with staying in the customs union if the UK fails to agree a trade deal with the EU.

The Lib Dems voted against the government alongside Labour, the SNP and some pro-EU Tories, but the government won by 307 to 301.

Pairing is an informal arrangement between two MPs of opposing parties that allows them, with the agreement of the Whips (Whips are the MPs responsible for discipline in each party), to miss occasional votes in the House.

If two members from opposite sides of the House both agree to miss a vote, then by agreeing to differ they would cancel out each other's vote, so neither member need turn up.

Ms Swinson, the deputy leader of the Liberal Democrats and MP for East Dunbartonshire, gave birth to her second son Gabriel on 29 June.

She said she had been told Mr Lewis would be her "pair" for the votes on the Trade Bill.

Mr Lewis did not take part in most of the day's Trade Bill votes, but did take part in the two closest divisions - the one on customs and another on medicine regulation, which the government lost.

Skip Twitter post by @BrandonLewis I’m sorry Jo. I think it was an honest mistake made by the whips in fast-moving circumstances. I know how important the pair is to everyone, especially new parents, and I apologise. Also apologies for late reply, been speaking at an event. — Brandon Lewis (@BrandonLewis) July 17, 2018 Report

Skip Twitter post by @sarahwollaston Who is taking responsibility for failing to honour the pairing agreement for @joswinson who is on maternity leave? More than just an extension of the other heavy handed tactics on display, it disrespects women and why maternity leave matters. — Sarah Wollaston (@sarahwollaston) July 17, 2018 Report

On Twitter, Ms Swinson accused the government of "desperate stuff" and a "calculated, deliberate breaking of trust" by Tory whips.

Labour's shadow equalities minister Dawn Butler accused Mr Lewis of "making politics even more inaccessible for new mums".

In a tweet to Ms Swinson, Mr Lewis said: "I'm sorry Jo. I think it was an honest mistake made by the whips in fast-moving circumstances. I know how important the pair is to everyone, especially new parents, and I apologise."

In his apology, Conservative chief whip Julian Smith said Mr Lewis had been "asked to vote in error".

Labour's Harriet Harman said the episode highlighted the need to allow MPs on parenting leave to nominate a proxy on their behalf.

The Commons backed this principle earlier this year and a committee of MPs has put forward recommendations for how it might work.

Ms Swinson said Parliament should now make a binding decision on introducing proxy voting before it breaks up for its summer recess on Tuesday.

In an urgent question in the House of Commons, Lib Dem chief whip Alistair Carmichael said there had been a "very serious breach of the convention" and that while he accepted the apology, it was "less than clear" to him how it had happened.

He described pairing as a "19th century practice" trying to cover for "21st century employment law" on baby leave.

Commons Leader Andrea Leadsom said the incident involving Ms Swinson's vote had happened "entirely in error" and "will not be repeated".

MPs will consider the issue of proxy voting "at the earliest opportunity", she added.

Speaker John Bercow warned of "endless procrastination" over the issue, and said a decision must be made soon.

Labour's shadow Commons leader Valerie Vaz said Parliament should agree immediately to "nod through" MPs on baby leave.

"It's vital we are a modern workplace and that those on baby leave can have their vote recorded."