LONDON — With a critical showdown over Brexit looming in Parliament, Britain’s mercurial new prime minister, Boris Johnson, took his opponents by surprise again Monday by threatening a snap general election if they defy him in a crucial vote to be held on Tuesday.

A government official, speaking on the condition of anonymity, said Mr. Johnson had told the cabinet that if lawmakers vote against the government on Tuesday, he would seek the go-ahead for a general election to be held on Oct. 14.

The move is intended to pressure rebel lawmakers in his own party to pull back from supporting legislation to stop a potentially disorderly British exit from the European Union without any agreement on Oct. 31.

But it also raises the prospect that Britons could soon be voting in the third general election in a little over four years — just ahead of one of the most important decisions in British history.