House Republicans on Thursday stymied an effort by their Democratic counterparts to force a vote on legislation that would offer special counsel Robert Mueller protection from President Trump.

With the backing of Democrats on the House Judiciary Committee, Rep. Jim McGovern, D-Mass., introduced the legislation as an amendment to three GOP tax-related bills.

The legislation dictated that Mueller could only be removed “for misconduct, dereliction of duty, incapacity, conflict of interest, or other good cause, including violation of policies of the Department of Justice.”

But Republicans voted down the efforts by Democrats that would have forced them to have to consider it for a full floor vote.

Democrats have moved with urgency on the legislation after Deputy Attorney General Rod Rosenstein appeared to be on his way out of a job at the Justice Department earlier this week.

Rosenstein oversees Mueller’s investigation and is the only person who can remove him from the position.

In addition to the uncertainty in Rosenstein’s job security, Democrats have been concerned over the president’s continual attacks on the special counsel.

The legislation also says that Congress must be provided written notice of any decision to remove Mueller, including a detailed explanation. The special counsel would also be given an opportunity to appeal to a three-judge panel, and the court would decide if Mueller’s investigation would remain active during the appeal.

And during that, all special counsel staff, documents, and materials would be preserved.

At least 120 House Democrats and six House Republicans support the McGovern legislation.

In the Senate, two Republicans — Lindsey Graham of South Carolina and Thom Tillis of North Carolina — have backed a similar bill that passed the Judiciary Committee, but was not brought up for a full Senate floor vote.

The New York Times report said last week that Rosenstein discussed secretly taping Trump and invoking the 25th Amendment to remove him from office, accusations that Rosenstein strongly dismissed.

Trump on Wednesday suggested the deputy attorney general would keep his job — at least for now.

The two were slated to meet Thursday to talk about the story, but that meeting was pushed to next week.