WASHINGTON — House Republicans and Democrats joined together Tuesday to overwhelmingly approve legislation that aims to punish North Korea for conducting its latest nuclear test.

Just hours ahead of President Barack Obama’s final State of the Union address, lawmakers passed the North Korea Sanctions Enforcement Act by a vote of 418-2. The bill proposes stronger sanctions that deny Pyongyang the money it needs for developing miniaturized nuclear warheads and the long-range missiles to deliver them, according to the legislation’s backers.

Cutting off North Korea’s access to cash also makes it difficult for Pyongyang to pay its army and police forces, said Rep. Ed Royce, R-Calif., chairman of the House Foreign Affairs Committee.

“What we are concerned about here is the miniaturization of nuclear warheads that fit onto its most reliable missiles,” Royce said Monday on the House floor. “This threat is unacceptable, and it has to be aggressively challenged.”

The White House does not oppose the House sanctions bill, said a senior administration official who was not authorized to speak publicly about the legislation and requested anonymity. The administration is deeply concerned about North Korea’s recent actions, the official said, and will continue to use existing sanctions authorities to prevent financial support for North Korea’s nuclear and missile programs.

Republicans who have criticized Obama’s foreign policy as feckless used the timing of the vote to demonstrate that they are taking swift action to deal with threats to the U.S. while the president procrastinates.

“When America doesn’t stand up to dictators, problems around the world only get worse,” said House Majority Leader Kevin McCarthy, R-Calif. “Foreign aggressors take American inaction as a sign of weakness, and the result is only more instability and insecurity abroad.”

The bill would use financial and economic pressure to isolate North Korean leader Kim Jong Un and his top officials from the assets that they maintain in foreign banks and from the money that sustains their rule, Royce said. These assets are derived primarily from illicit activities, he said, such as selling their missile technology, counterfeiting U.S. currency, and drug smuggling. “And all of that is used to advance North Korea’s nuclear program,” Royce said.

A similar strategy was used very effectively a decade ago by the Treasury Department, Royce said.

A central part of the House legislation is to make so-called “blocking sanctions” mandatory rather than discretionary as currently permitted through existing regulations.

The sanctions are mandated against any country, business or individual that materially contributes to North Korea’s nuclear and ballistic missile development, imports luxury goods into North Korea, or engages with Pyongyang in money laundering, the manufacture of counterfeit goods, or narcotics trafficking, according to the legislation.

Royce’s committee unanimously approved the sanctions bill in February 2015 and it remained there until last week when North Korea announced it had conducted a fourth nuclear test — this one detonating a thermonuclear device with massive destructive power.

The announcement was met with doubt North Korea had set off a hydrogen bomb, which would mark a major technological advance for Pyongyang’s limited nuclear arsenal. But it could take weeks or even longer to confirm or refute the claim.

Members of the Senate Foreign Relations Committee received a classified briefing on North Korea on Monday evening. Committee chairman Sen. Bob Corker, R-Tenn., said the work of determining what type of bomb was detonated is ongoing. “It’s too early to tell,” Corker said Tuesday.

Senate bills to sanction North Korea for previous actions, including the alleged cyberattack on Sony Pictures Entertainment, have not moved as quickly. Senate Majority Leader Mitch McConnell of Kentucky said Tuesday that sanctions legislation sponsored by Sen. Cory Gardner, R-Colo., would be considered by the Foreign Relations Committee “very soon.”