(CNN) A rebel alliance of British lawmakers has voted to seize control of the parliamentary agenda, inflicting a humiliating defeat on Prime Minister Boris Johnson and threatening to derail his Brexit plans.

The government lost by 328 votes to 301, prompting Johnson to immediately announce that he would seek an election rather than be forced to request another "pointless delay" to the Brexit process.

The cross-party group of rebels will try to push through a bill on Wednesday that will prevent the UK leaving the EU on October 31 without a deal. The Prime Minister, meanwhile, will challenge the opposition Labour Party to vote in favor of a general election.

"Let there be no doubt about the consequences of this vote tonight. It means that parliament is on the brink of wrecking any deal we might be able to strike in Brussels," Johnson told the House of Commons moments after the vote was announced.

In an extraordinary purge, the 21 Conservative lawmakers who voted in favor of the measure were booted out of the parliamentary party. Kenneth Clarke, who has been a Conservative lawmaker for 49 years, told the BBC he was sanguine about the decision. Clarke said his party had been taken over by extremists: "Anyone who who comes up to me and tells me I'm not a Conservative is taking an odd political view. It's the Brexit Party rebadged."

Read More