Some hurdles remain. Antonia Ferrier, a spokeswoman for Senator Mitch McConnell of Kentucky, the majority leader, said it was not yet clear if the Senate would approve and send the bill to President Trump’s desk before lawmakers leave for the August recess.

The conflict over North Korea sanctions had been the latest detour in the legislation’s halting journey through the Capitol. As the Trump administration lobbied against a measure that would sharply limit the president’s ability to lift or suspend sanctions against Russia on his own, the bill languished in the House for weeks.

But after the House voted on Tuesday, 419 to 3, to impose sanctions on Russia, Iran and North Korea, supporters seemed confident that the legislation would reach Mr. Trump in short order. It would force the president into an uncomfortable choice, beneath the cloud of Russia-flecked scandal: whether to sign a bill his team has opposed or to honor Moscow’s wishes by seeking to scuttle the efforts of a Republican-led Congress.

The Senate had seemed an unlikely source of further bottlenecking, given its vote last month, 98 to 2, to punish Russia and Iran. But after House leaders from both parties and Senate Democrats cheered an agreement last weekend to break the House impasse — in part by including House-led sanctions against North Korea — Senate Republicans were more reserved.

Senate Democrats suggested that their counterparts were erecting roadblocks to protect Mr. Trump.

Earlier this year, Mr. Corker was more receptive than many colleagues to the administration’s position that the White House deserved time to establish a better relationship with Russia. But in recent months, Mr. Corker has insisted that he, too, wants to punish Russia for its aggression toward its neighbors and for interfering in last year’s American election.