By blocking Mr. Johnson, Parliament has thrown the whole process into a legislative netherworld that could mean months of further delays to a process that the nation has long since wearied of and just wants to see end.

It is entirely conceivable that Mr. Johnson’s deal will kick around Parliament for weeks, potentially becoming encumbered with amendments that either Mr. Johnson or the European Union would reject as unacceptable. The best option then, analysts said, would be to give the voters a chance to make themselves heard in a general election.

The back-to-back votes captured the one-step-forward, one-step-back nature of the Brexit saga. While lawmakers endorsed the contours of Mr. Johnson’s plan — something they had never done for his predecessor, Theresa May — they balked at being stampeded into passing the necessary legislation in three days.

The European Union will now have to decide how long an extension to grant Britain. Mr. Johnson said after the votes that he would “pause” the legislation and call European leaders to deliver the message that Britain was not interested in another extension.

Earlier on Tuesday, he said that if the deadlock slipped into next year, he would rather pull the bill altogether and face the voters, calculating that he could still win a popular mandate for a swift Brexit.