The Senate on Wednesday overwhelmingly passed legislation that would impose mandatory sanctions on North Korea, in a bid aimed at forcing the international community to retaliate more strongly against the rogue nation after a series of worrisome moves.

Since North Korea announced its fourth nuclear test in early January, it has launched a satellite into space over international objections, and a top U.S. intelligence official has warned that Pyongyang is perhaps only weeks from recovering plutonium from its restarted Yongbyun reactor. Yet none of these steps seem to have broken a logjam at the U.N. Security Council, where competing loyalties are keeping the United States, China, and other members from punishing North Korea, despite the shared sentiment that the rogue regime’s latest steps are out of line.

“When we have ‘partners,’ quote-quote, on the U.N. Security Council that are unwilling to take steps, it means even more so that this body… has got to be proactive,” Senate Foreign Relations Committee Chairman Bob Corker (R-Tenn.) said Wednesday.

The United States has tried to direct its response to North Korea through the U.N. Security Council. Just two weeks ago, China, North Korea’s most important sponsor, agreed to back a resolution condemning North Korea’s recent nuclear test. But Beijing never took the additional step – supporting expanded sanctions against the rogue regime.

Now Congress doesn’t want to wait for the Security Council to get its act together or for the Obama administration to act unilaterally.

“This legislation represents what Congress needs to do,” said Senate Foreign Relations Committee ranking member Ben Cardin (D-Md.) “U.S. leadership is absolutely critical in standing up to North Korea’s activities.”

The bill was passed on a 96 to 0 vote.

The House passed similar legislation last month and may soon consider the Senate measure. It’s unclear if the White House supports the language, but they have not publicly objected to it.

The two remaining Republican senators on the presidential campaign trail, Ted Cruz (Texas) and Marco Rubio (Florida), made sure to bolster their national security bona fides by returning to Washington to vote for the bill. Democratic presidential candidate Bernie Sanders (I-Vt.) missed the vote.

Cruz said the administration should go beyond sanctions to further pressure Pyongyang.

“The president should list North Korea again as a state sponsor of terrorism,” he told reporters. “The president needs to pressure China to rein in North Korea and stop pretending China is a friend on this.”

The Senate bill is a compromise drafted by Sens. Cory Gardner (R-Colo.) and Robert Menendez (D-N.J.) and goes a few steps further than the House legislation. Most of the bill’s new sanctions on North Korea are mandatory, forcing the president to freeze the assets and impose travel bans on anyone engaging in trade or financial transactions that support the country’s nuclear, weapons, precious metals and raw materials industries, human rights abuses, and cyber threats.

Such mandatory sanctions are a rare step for Congress, which usually authorizes sanctions but gives the administration discretion on when and upon whom to enforce them. Under the bill, the president would maintain the right to waive certain sanctions – but only on a case-by-case basis, and only if it is in the national security or law-enforcement interest of the United States.

The sanctions would provide exceptions for humanitarian organizations and aid workers seeking to help the North Korea people.

Recently, Congress has become increasingly impatient with the administration’s lack of speed in imposing sanctions on regimes that break international rules. In the last few months, even Democrats voiced frustration with the administration’s response to Iran staging two ballistic missile tests, despite evidence that they violated existing U.N. Security Council resolutions. The administration eventually announced last month that it had added 11 people and entities to the Iran sanctions list over the tests, but lawmakers don’t believe that is enough.

What Congress hopes to do with North Korea is in a sense, repeat history, by ramping up sanctions to such a crippling extent that they force Pyongyang to abandon its nuclear ambitions and change course on human rights – or at least come to the negotiating table, as they did before.

Senators of both parties recalled the mid-2000s, when the United States sanctioned Macau-based Banco Delta Asia, which was handling funds for the North Korean regime. Those sanctions eventually yielded a breakthrough in negotiations to get Pyongyang to give up its nuclear weapons.

But the breakthrough didn’t last – the U.S. later eased sanctions as a bargaining chip, and talks eventually fell apart.

“We let up, we didn’t keep the pressure up,” Cardin said Wednesday. “This legislation will correct that oversight.”

And both Democrats and Republicans identified another precursor to imposing tough sanctions on North Korea: Iran. If Congress can emulate the Iran sanctions in the case of North Korea, lawmakers reasoned, it might bring Pyongyang to the nuclear negotiating table, just as punishing sanctions eventually compelled Tehran to make a deal to surrender its nuclear ambitions for lifting sanctions.

Even lawmakers that derided and voted against the Iran nuclear deal acknowledged it was an important precedent for North Korea sanctions policy — especially because the United States began sanctioning Iran long before the United Nations picked up the cause.

“When we began the Iran sanctions, it was unilateral,” Corker argued, though he opposed the Iran nuclear deal. “I really do believe that passage today of this, and ultimate signature by the president, has the potential to unleash the same chain of events that occurred relative to Iran, hopefully with a better outcome.”

Kelsey Snell contributed to this story.