WASHINGTON — Senate Republicans blocked a vote on a bill to protect special counsel Robert Mueller on Wednesday, despite a threat from a GOP senator to hold up judicial nominees until action is taken on the measure.

Critics of President Donald Trump in both parties have for months advocated for legislation to safeguard Mueller and his investigation into Russian meddling in the 2016 presidential election, but the effort gained renewed momentum earlier this month when Trump fired Jeff Sessions as attorney general and replaced him with Matthew Whitaker, a controversial loyalist who criticized the Russia probe before joining the administration.

Advocates' hopes were raised briefly when the second-ranking Senate Republican, Sen. John Cornyn of Texas, said in an interview that the chamber might take up the bill this week after all.

But those hopes were dashed Wednesday afternoon when Sen. Mike Lee, R-Utah, objected to a request for unanimous consent to proceed to a full vote on the bill.

It was not the first time proponents have tried and failed to use unanimous consent to get a vote on the bill, which passed the Republican-led Senate Judiciary Committee this spring on a bipartisan basis, 14-7.

The bill, like several related measures, would essentially codify internal Department of Justice guidelines meant to insulate the special counsel from political influence from the White House.

Republicans have objected on two grounds, one constitutional and the other practical, arguing the bill is unnecessary and the Senate has no time to spare in the crowded lame-duck session of Congress.

"This is a solution in search of a problem," Senate Majority Leader Mitch McConnell, R-Ky., told reporters Tuesday. "The president is not going to fire Robert Mueller. ... We have a lot of things to do to try to finish up this year without taking votes on things that are completely irrelevant to outcomes."

Lee made the constitutional case in his objection, citing the late Supreme Court Justice Antonin Scalia to argue that the president has rightful control of the Department of Justice and that insulating the special counsel from White House oversight would essentially amount to "creating a fourth branch of government."

Trump critics were not moved by either argument.

Outgoing Sen. Jeff Flake, R-Ariz., who sits on the Judiciary Committee, has threatened to withhold his vote for all of Trump's judicial nominees unless McConnell allows for a vote on the Mueller protection bill.

"To be so sanguine about the prospects of (Mueller) being fired is folly for us," Flake said on the Senate floor. "Mr. Mueller must be able to preserve the work he has done and complete this very thorough investigation and make his findings public."

Sen. Chris Coons, D-Del., said the bill should be viewed as an insurance policy.

"This is the easiest way possible to prevent an entirely predictable constitutional crisis," Coons said in speech on the floor. "We could take up and pass this bill in a few minutes this afternoon and I'm confident it would get 60 votes."

But as long as McConnell refused to bring the bill up for a vote, they will not find out if Coons' prediction is correct.

Flake said he and his allies would keep trying, though he will be out of office in early January.

"We promised to come to the floor again, and again, that’s why we’re here today. We’ll continue to do so until this vital investigation is completed," he said.