Theresa May has won the overwhelming backing of MPs for her decision to hold a general election on 8 June, saying it will secure “stability and certainty” as Britain prepares to enter Brexit talks.

MPs backed the government motion to hold a general election, with 522 voting in favour and 13 against, a majority of 509. It gives the prime minister the two-thirds majority required by the Fixed-term Parliaments Act to hold a general election before May 2020.

General election 2017: MPs vote in favour of 8 June poll by margin of 509 – politics live Read more

May had repeatedly said she had no plans to hold an early general election before surprising Westminster, including many of her own colleagues, by announcing the 8 June poll on Tuesday.

Parliament will be dissolved on 2 May and the formal election campaign will begin.

Justifying the change of heart to MPs in the House of Commons shortly after prime minister’s questions on Wednesday, May said: “Today we face a new question: how best to secure the stability and certainty we need over the long term in order to get the right deal for Britain in Brexit negotiations and make the most of the opportunities ahead. And I’ve come to the conclusion that the answer to that question is to hold a general election now in this window of opportunity before the negotiations begin. A general election is the best way to strengthen Britain’s hand in the negotiation.”

Opposition MPs criticised the move, accusing May of going back on repeated claims that she would not hold an early election, and of seeking to silence debate.

The Labour leader, Jeremy Corbyn, said: “Britain is being held back by her government. Most people are worse off than they were when the Conservatives came to power seven years ago, the election gives the British people the chance to change direction.”

He added: “This election is about her government’s failure to rebuild the economy and living standards for the majority. It is about the crisis her government has plunged the NHS into, the cuts to to our children’s schools which will limit chances of children, 4 million of whom live in poverty, a chance of an alternative to raise living standards, as more and more people do not have security in their work or over their housing.”

Those who voted against holding the election included the Labour MPs Clive Lewis, Ann Clwyd and Liz McInnes. Lewis, who postponed a planned May wedding because of the snap poll, said Labour should have forced the prime minister to trigger a vote of no confidence, the only other way the government can overturn the election schedule imposed under the Fixed-term Parliaments Act.

Facebook Twitter Pinterest Corbyn addressing the Commons on Wednesday. Photograph: Reuters

The Scottish National party’s leader at Westminster, Angus Robertson, said: “For months we have heard from her that now is not the time for the public to vote, that no one wants it, that it is important to get on with the day job, that nothing should get in the way. But now as we have all learned, all of that was empty rhetoric.”

He said the prime minister had called the election for two reasons: to “crush political opposition in England”; and because “it has finally dawned on the UK government that the Brexit negotiations are going to be very, very difficult”. All the SNP’s MPs abstained in the vote.

Robertson asked how May could justify a general election in the UK when she had rebuffed the Scottish government’s request for a second independence referendum.

May replied: “Now is the time for a general election because it will strengthen our hand in the negotiations on Brexit. Now is not the time for a second referendum because that will weaken our hand in negotiations on Brexit. Strength and unity with the Conservatives; division and weakness with Scottish nationalists.”

The Liberal Democrat leader, Tim Farron, accused the prime minister of putting her party before her country.

The vote was the first time the Fixed-term Parliaments Act had been tested. It was meant to prevent governments calling elections at politically opportunistic moments – and to hold together the coalition between the Conservatives and the Lib Dems.

At PMQs, May had hinted at the Conservatives’ attack lines in the forthcoming campaign. She batted away questions from Labour backbenchers about issues including schools funding and the NHS by repeating back to them their own comments about Corbyn during last summer’s leadership campaign.

Meanwhile it was reported thatMay will include her Brexit negotiating priorities in the Conservative general election manifesto.

The document will include guarantees to end the free movement of European Union citizens, to leave the European single market, and to end the jurisdiction of the European Court of Justice, according to the Daily Mail. Including the pledges in the manifesto would make it extremely difficult for Remain-backing Tory MPs to rebel on the issues in House of Commons votes if the party wins the snap election.

Peers would also be forced to back the priorities under the Salisbury Convention, which means that the Lords will not try and vote down government plans mentioned in an election manifesto.