WASHINGTON — The U.S. House of Representatives passed legislation Tuesday evening that seeks to bar President Donald Trump from withdrawing from NATO amid renewed concerns over his commitment to the 29-nation military pact.

In a bipartisan 357-22 vote, the Democrat-led lower chamber sent the Senate the NATO Support Act, which would prohibit the use of federal funds to withdraw from the 70-year-old alliance. Twenty-two Republicans voted no, while 28 Republicans and 26 Democrats did not vote.

Beyond asserting Congress’ power of the purse, the bill affirms support for NATO and its mutual defense clause, for Montenegro’s accession, for “robust” U.S. funding for the European Deterrence Initiative and for the goal that each member nation spend at least 2 percent of its gross domestic product on defense by 2024.

The action comes as trans-Atlantic ties have been frayed by disputes over defense spending, trade and America’s withdrawal from the Iran nuclear deal. After reports Trump floated the idea of a withdrawal last summer, Trump said last week, "We will be with NATO 100 percent, but as I told the countries, you have to step up,” defense spending.

Rep. Jimmy Panetta, D-Calif., sponsored the bill with backing from House Majority Leader Steny Hoyer, D-Md., and Foreign Affairs Committee Chairman Eliot Engel, D-N.Y. At a press conference Tuesday, the lawmakers praised the alliance for its role in ending the Cold War and in supporting U.S.-led operations in Iraq and Afghanistan today.

“What we have to realize is that NATO is not just a transactional relationship.” Panetta said. “Our sole focus can’t just be on who pays what and who gets what. Being a member of NATO is not like being a member of a country club.”

Engel called splintering the NATO alliance one of Russian President Vladimir Putin’s top goals.

“That’s why its so disturbing, so troubling to see the United States sending mixed signals about the alliance or treating it as a burden,” Engel said.

“This bill reiterates Congress' commitment to NATO and would prohibit withdrawal from NATO. It sends a clear message to the administration that this branch of government supports the alliance,” Engel said in a floor speech ahead of the vote.

Trump has bashed the alliance over burden sharing, made overtures to Putin and said he believes he has the authority to pull out of NATO if he chooses — even as his administration has worked to support the alliance.

The bill had four Republican cosponsors, including Texas Rep. Will Hurd, who tweeted after the vote, “These recent votes show that there is overwhelming bipartisan support from Congress, a coequal branch of government, to value our allies and stand up to our enemies.”

The vote followed news the top U.S. diplomat for Europe is resigning after only 16 months on the job. Assistant Secretary of State for Europe and Eurasian Affairs Wess Mitchell will leave his post in mid-February.

One of the bill’s co-sponsors, Rep. Tom Malinowski, D-N.J., called Congress “the only check we have” after the departure of former generals Jim Mattis as defense secretary, H.R. McMaster as national security adviser and John Kelly as chief of staff — and Nikki Haley as United Nations ambassador.

“They’re all gone now, we’re all that’s left, and its urgent and essential, therefore, that Congress play its constitutional role and take this action,” said Malinowski, a former U.S. diplomat and now a freshman congressman on the House Foreign Affairs Committee.

This measure and a similar one in the Senate, which would require Trump get two-thirds consent from the Senate to pull America out of NATO, have raised questions about the constitutional separation of powers. The bipartisan Senate bill, led by Sen. Tim Kaine, D-Va., is cosponsored by Sen. Lindsey Graham, R-S.C., and others.

The sponsors of the House bill expressed optimism the two bills would be reconciled, suggesting that Congress’s power of the purse is solid enough footing to proceed.

“It’s often been said the Constitution is an invitation to struggle, and what we are saying here is we are not leaving NATO without a struggle,” Malinowski said.