Senate Republicans and Democrats on Sunday unveiled a $118.3 billion compromise bill to crack down on unlawful migration across the U.S. border with Mexico and speed critical security aid to Ukraine, but a backlash from House leaders threatened the deal’s chances of passing a deeply divided Congress.

The release of the agreement, struck after more than three months of near-daily talks among a bipartisan group of senators and Biden administration officials, counted as an improbable breakthrough on a policy matter that has bedeviled presidents of both parties and defied decades of efforts at compromise on Capitol Hill. But House leaders greeted the measure with disdain, promising that even if it could get through the Senate, the House would keep it from becoming law.

“Let me be clear: The Senate Border Bill will NOT receive a vote in the House,” Representative Steve Scalise, the majority leader, said in a social media post, echoing Speaker Mike Johnson’s position that the bill would be “dead on arrival.”

President Biden, who last month promised he would shut down the border immediately if the measure became law, directly challenged House G.O.P. leaders on Sunday as he implored Congress to pass the bill and send it to his desk as soon as possible.

“If you believe, as I do, that we must secure the border now, doing nothing is not an option,” he said in a statement, adding that “House Republicans have to decide. Do they want to solve the problem? Or do they want to keep playing politics with the border?”

The bill features some of the most significant border security restrictions Congress has contemplated in years. They include making it more difficult to claim asylum, vastly expanding detention capacity and effectively shutting down the border to new entrants if more than an average of 5,000 migrants per day try to cross over unlawfully in the course of a week, or more than 8,500 attempt to cross in any given day.