An early UK general election has been announced. So what happens now?

Under the Fixed-term Parliaments Act 2011 general elections should take place on the first Thursday in May every five years. The last election was held on 7 May 2015, so the next one was not due until 2020.

But the prime minister has just announced that an early general election will be held on 8 June 2017. So, what is likely to happen now?

There are two formal ways that a general election could happen and Theresa May indicated she would call for the quickest way available under the act.

This would be if two-thirds of MPs backed a motion calling for an early election. The motion would require support from two-thirds of all the seats in the Commons - not just those who vote - and this includes one vacant seat as well. With 650 seats in the Commons, that means 434 MPs must back an early election.

On Wednesday, the government will propose such a motion, under Section 2 of the Fixed-term Parliaments Act 2011: "That there shall be an early parliamentary general election." The MPs will then vote on the motion and are expected to approve it overwhelmingly, because the main opposition parties have said they will support it.

The Fixed-term Parliaments Act was introduced after the 2010 election, and was interpreted as an effort to solidify and bind together the new coalition government. The discretion of prime ministers to pick the timing of elections was removed and the dates fixed five years apart.

The Liberal Democrats, who were the junior partners in the coalition, wanted to prevent David Cameron from calling a snap election on a date of his choosing, removing a power that had been held for centuries under the Royal Prerogative. It was "a big change and a good change", David Cameron argued.

There is a second formal way for an early general election to happen under the act - but it would have been extremely unlikely in the current circumstances. A motion of no confidence in the government would have to be passed in the House of Commons and, within 14 days, there would have been no motion passed expressing confidence in any alternative government.

This method would have required an absolute majority of voting MPs. But it would be slower, and the government would have to engineer it artificially by getting Conservative MPs to back a motion of no confidence in their own government.