WASHINGTON (AP) — Nearly two dozen House Republicans joined Democrats Thursday to pass a bill that would restore collective bargaining rights for hundreds of thousands of federal employees, an attempt to overturn an executive order that President Donald Trump issued earlier this year.

The measure passed 231-195 after reaching the floor through a bipartisan maneuver that bypassed GOP leadership — a so-called “discharge” tactic that is being used with growing frequency as Republicans seethe over dysfunction in the chamber. The bill still needs Senate approval to become law, but 20 Republicans sided with Democrats in a rare break from the president.

The executive order that Trump issued in March aimed to end collective bargaining for employees of agencies with national security missions across the federal government. He said he had the authority to revoke the rights under a 1978 law.

“Reinstating these rights is not a concession — it is a commitment. A commitment to treat federal workers with dignity, to reinforce a resilient public service, and to honor the commitment of the men and women who show up for the American people every single day,” GOP Rep. Brian Fitzpatrick, a co-sponsor of the bill, said on the floor before passage.

Trump's order targeted the union rights of roughly 600,000 of the 800,000 federal workers represented by the American Federation of Government Employees, or AFGE, including those at the Department of Veterans Affairs and the Department of Defense.

The union is challenging those moves in court, arguing they are illegal and retaliatory. In May, an appeals court said the administration could move forward with the executive order while the lawsuit plays out.

In a statement after Thursday's vote, the AFGE said it “extends its deep appreciation to every member of Congress who voted for the bill.” The group's president, Everett Kelley, called it a “seismic victory.”

The bill's approval was also praised by the AFL-CIO, the biggest labor federation in the U.S.

“We commend the Republicans and Democrats who stood with workers and voted to reverse the single largest act of union-busting in American history,” said Liz Shuler, the group's president.

The bill reached the floor through a discharge petition led by Democratic Rep. Jared Golden of Maine. It’s a tactic that has been used with increasingly frequency this Congress due to frustrations with GOP leadership, including in the high-profile push to force release of the Jeffrey Epstein files. Any lawmakers can force a vote on legislation if their petition gains 218 signatures, a majority in the 435-member House.

All House Democrats who voted supported the measure to restore the bargaining rights. House Democratic Leader Hakeem Jeffries supported the bill, saying on the floor prior to its passage that it would help “public servants who have been targeted viciously by the Trump administration from the very beginning of his time in office.”

While passage in the Republican-held Senate appears unlikely, the vote represented one of the chamber’s first formal rebukes of the president and the flurry of executive orders he has issued during his second term.

The White House did not immediately respond to a request for comment.

Still, most of the Republicans who backed the bill still held back from directly calling out the president. Speaking on the House floor before voting in favor of the bill, New York Republican Rep. Mike Lawler said that “earlier this year, an executive order changed the collective bargaining status.”

“Every American deserves a voice in the workplace, and that includes the people who keep our government running and open,” said Lawler.

Of the 20 Republicans who backed the bill, many, including Fitzpatrick, face tough reelections next year. It comes at a time when some Republicans, following Trump's lead, have become more supportive of labor unions, long a key part of the Democratic Party's coalition.

New Jersey Rep. Jeff Van Drew, who switched parties in Trump's first term, was among the Republicans to support the bill, but told reporters prior to the vote that he wasn't trying to send a message to the president with his vote.

“No message here at all,” said Van Drew. “This is a New Jersey message. I got to take care of my people. And I’ve always been supportive of unions.”

___