LONDON — Prime Minister Boris Johnson on Tuesday won a major vote approving in principle his new Brexit plan, but instantly faced a second and more difficult test as lawmakers threatened to derail a second bill to assure its swift passage through Parliament.

Mr. Johnson’s victory was nevertheless a significant moment in the three-year Brexit saga, coming after Parliament refused three times to endorse the blueprint of his predecessor, Theresa May, to leave the European Union. Nor had Mr. Johnson previously won any important votes in Parliament, where he has no majority.

But the looming second vote could end Mr. Johnson’s hopes of getting his plan ratified in time for Britain to leave the European Union on Oct. 31, as he has promised it will. The House of Commons is being asked to condense scrutiny of the legislation enacting one of Britain’s biggest recent decisions into just three days — a timetable that has angered many lawmakers.

Rather than accept a significant new delay, Mr. Johnson threatened to pull the legislation and demand a general election to settle, once and for all, Britain’s grinding debate on Brexit. The opposition was preparing a series of proposed amendments to the legislation, and a further delay could strengthen their hand in doing so — to such an extent that it could have the effect of unraveling the bill.