Members of Parliament have voted for a new law to force Boris Johnson to delay Brexit and stop a no-deal exit from the EU.

The legislation is designed to force the prime minister to request a three month extension to the UK's Brexit deadline, currently due to run out on October 31.

The bill now passes to the House of Lords where pro-Brexit peers hope to block it.

Johnson has insisted he will refuse to request any extension and is seeking an early general election to overturn any delay.

Visit Business Insider's homepage for more stories.

Boris Johnson has suffered a major defeat to his Brexit plans after members of parliament voted for a new law to force him to seek a three month delay to the UK's exit from the EU.

MPs voted by 327 votes to 299 to back he bill which will now move to the House of Lords, where pro-Brexit peers hope to block it through a planned all-night filibustering attempt.

If they fail, the law should complete its passage through the Houses of Parliament by Monday, with Johnson compelled to seek an extension if he has failed to ratify a deal with the EU by October 19.

The prime minister insists that he will refuse to request a delay from the EU and will bring forward a motion challenging the opposition to a general election on October 15.

Read more: What happens now MPs have voted to delay Brexit until 2020?

The opposition Labour party is set to reject Johnson's election motion, with their leader Jeremy Corbyn insisting that the bill to delay Brexit must be passed before they will back an early poll.

Johnson's defeat on Wednesday was all but guaranteed after he expelled 21 Conservative MPs from the party for backing an earlier vote paving the way for tonight's bill.

Read more: Boris Johnson expels 21 Conservative moderate MPs, including 2 former chancellors and Winston Churchill's grandson

Boris Johnson pushes for early general election

Johnson has challenged Labour leader Jeremy Corbyn to vote for an early election and will bring forward a vote on Wednesday evening designed to authorise a new poll to be held on October 15.

However, many opposition MPs are wary of backing the motion, amid fears that Johnson could use a general election in order to bounce the UK into a no-deal Brexit.

Shadow Foreign Secretary Emily Thornberry said on Tuesday that the party would reject any immediate election motion brought forward by the government on Wednesday.

"There won't be a general election called tomorrow because we're not going to vote for it because we have got to make sure that this legislation is embedded, signed off by the Queen, and there is no argument about it anymore," she told ITV.

Corbyn said he would vote for a general election only once the legislation to delay Brexit was secured.

"He wants to table a motion for a general election — fine. Get the bill through first, in order to take no deal off the table," the Labour leader said.