President Biden fought on Friday to save a bipartisan immigration deal from collapse in Congress, vowing to shut down the border if the plan became law even as the Republican speaker pronounced it dead on arrival in the House.

In a written statement that came as Senate negotiators scrambled to finalize a deal that former President Donald J. Trump is pressuring Republicans to oppose, Mr. Biden used his most stringent language yet about the border, declaring it “broken” and in “crisis” and promising to halt migration immediately if Congress sends him the proposal.

“What’s been negotiated would — if passed into law — be the toughest and fairest set of reforms to secure the border we’ve ever had in our country,” he said. “It would give me, as president, a new emergency authority to shut down the border when it becomes overwhelmed. And if given that authority, I would use it the day I sign the bill into law.”

The pending compromise would not give him much choice. Under the emerging deal, the administration would be required to shut down the border to migrants attempting to enter without prior authorization if encounters rise above 5,000 on any given day — a threshold that has been surpassed routinely in recent months.

Mr. Biden’s fresh efforts to salvage the deal came hours after Speaker Mike Johnson sought to choke off the last remaining glimmers of hope that it might survive, repeating that the agreement would almost certainly be a nonstarter in the Republican-led House.

“If rumors about the contents of the draft proposal are true, it would have been dead on arrival in the House anyway,” Mr. Johnson wrote in a letter to House G.O.P. lawmakers.