October 5, 2019 | 5:01pm

Boris Johnson is preparing to “squat” as Prime Minister in 10 Downing Street — even if fellow members of parliament stage a successful vote of no confidence in his government — in order to ensure Brexit is accomplished by Oct. 31, according to the Sunday Times of London.

The gambit essentially challenges the queen to fire him, a move that has not been employed by a British monarch since William IV fired Lord Melbourne in 1834.

Like his predecessor, Theresa May, Johnson has struggled to negotiate Britain’s exit from the European Union in a way that is acceptable to his fellow legislators and to EU leaders in Brussels.

Johnson’s plan to pressure the EU with threats of an exit with no deal were scuttled by rogue members of his own conservative party last month.

“Our opponents have flouted convention and there is nothing in the Fixed-term Parliaments Act that says you have to resign. The Queen is not going to fire the prime minister. She would dissolve parliament and let the people decide,” a senior cabinet minister told the British paper, offering an explanation for Johnson’s thinking.

There is no clear consensus among the parliamentarians about who might succeed Johnson should he be forced from the Prime Minister’s office.