But Mrs. May has run a rough, uncertain campaign, while Mr. Corbyn, beginning with low expectations, has had a good one. Although some Labour moderates privately hoped that a cataclysmic defeat would sweep him away, now it looks as if the party will do well enough to maintain its uneasy status quo, and Mr. Corbyn and his proto-Marxist program will survive.

For Corbynistas, as his staunch supporters are known, a vaguely successful, better-than-expected outcome is fine enough. But for Labour’s less ideological, more politically ambitious lawmakers, it would be nothing short of disaster, leaving them “to the thought of a decade out of power, of a whole career at Westminster without power,” said Tim Bale, a professor of politics at Queen Mary University of London.

“You would normally think that Labour, like the Tories, would want to win the next election,” said Tony Travers, a professor of government at the London School of Economics. “But Labour under its current leadership doesn’t see that as the overwhelming purpose. Rather, it is to keep the machine in the hands of Jeremy Corbyn or someone like him.”

Labour is suffering from a deep division between well-educated, globalized urbanites like Mr. Corbyn and its traditional white working-class constituents. Those voters supported Britain’s withdrawal from the European Union, known as “Brexit,” and could be tempted for the first time in generations to support a Tory on Thursday.

On a tactical level, there is also a split between a leadership that wants to build a left-wing social movement and those, including most of its elected legislators, who want to move to the center to try to win an election.