Judy Shelton’s nomination to the Federal Reserve Board of Governors was blocked in the Senate on Tuesday, with bipartisan opposition to the controversial economist and GOP absences prompted by the coronavirus imperiling her candidacy.

The vote had been expected to be razor-thin for Shelton, who was nominated by President Trump despite her past criticism of the central bank and her unorthodox views of monetary policy. But after the vote was scheduled, two Republicans, Sens. Rick Scott (Fla.) and Charles E. Grassley (Iowa), announced they were quarantining themselves after being exposed to the coronavirus and could not attend. (Grassley on Tuesday evening announced he had tested positive for the virus.) Two Republican senators voted against advancing Shelton on Tuesday; a third GOP senator who does not support her, Sen. Lamar Alexander (Tenn.), was not in attendance for the vote Tuesday.

The last-minute shifts proved too much for Republicans to overcome, at least for now. Although the GOP holds 53 seats in the Senate, Majority Leader Mitch McConnell (R-Ky.) was able to muster only 48 Republican senators to end the filibuster on Shelton’s nomination. In the end, he voted against moving the nomination forward as well, a procedural move that allows him to bring up Shelton’s nomination at a later time.

Before the coronavirus crisis, Trump repeatedly lashed out at the central bank for not doing more to boost the economy and lower interest rates. On several occasions, Trump has aimed his ire at Jerome H. Powell, expressing regret for nominating him to the position of Fed chair and once labeling Powell an “enemy.” More recently, Trump has toned down his attacks on the Fed, even calling Powell his “most improved player.”

Apart from Lael Brainard, Trump has put every other Fed governor in his or her current post. But the seven-seat board has been operating with two vacancies for a few years, and Trump has struggled to get his final nominees through. In 2019, two of Trump’s picks, Stephen Moore and Herman Cain, withdrew their bids after intense scrutiny for their past remarks and views about women jeopardized their chances at confirmation.

Trump has also tapped Christopher J. Waller to the Fed board. The St. Louis Fed economist’s nomination has been far less controversial, but it’s unclear when or if Republicans will move to vote on Waller before the end of the year.

Shelton’s nomination was particularly controversial given her calls for a return to the gold standard, which the nation fully abandoned in 1971. She advised Trump’s 2016 presidential run and has been outspoken against the Fed as an institution. She also was criticized for altering some of her views to appear in closer agreement with Trump’s aggressive push for lower interest rates, which some senators worried would insert politics into Fed decisions.

Alexander announced Monday he would not support Shelton’s confirmation. He joined Sens. Susan Collins (R-Maine) and Mitt Romney (R-Utah), who said over the summer that they would vote no and did so on Tuesday.

“In her past statements, Ms. Shelton has called for the Federal Reserve to be less independent of the political branches and has even questioned the need for a central bank,” Collins said in a statement Tuesday. “This is not the right signal to send, particularly in the midst of the pandemic.”

After Tuesday’s vote, White House spokesman Judd Deere tweeted that Shelton “is incredibly qualified. The @WhiteHouse fully supports her, and we remain confident that Judy Shelton will be confirmed upon reconsideration.”

Sen. Marco Rubio (R-Fla.), who supported Shelton’s nomination, said the Fed “plays too much of a role shaping our economy” and that he and Shelton share the belief that “relying on the Federal Reserve to boost asset prices is no substitute for a strong American economy.”

“I also believe she appreciates the risks to our financial system posed by China, and is concerned about the financialization of our economy,” Rubio said. “And I believe the Board of Governors would benefit from having somebody who is aware of these issues and vocalizes them in their deliberations.”

It is somewhat unusual for the majority party to let a vote fail in the Senate. But McConnell took procedural steps late last week to tee up Shelton’s nomination on the Senate floor before Scott and Grassley announced they would quarantine because of coronavirus exposure and Alexander announced his opposition to Shelton. Under floor rules, McConnell would have needed the consent of all senators to cancel or delay the vote.

Underscoring how critical every Republican vote will be in the waning weeks of this year, McConnell urged senators during a private party lunch Tuesday to be careful and healthy so the GOP-controlled majority can finish work that remains to be done, such as confirming nominees to the circuit courts, according to three people directly familiar with his closed-door remarks.

McConnell stressed that there is no margin for error and noted that keeping all the players on the field — meaning Republican senators — was becoming challenging, said the people, who spoke on the condition of anonymity to discuss the majority leader’s private comments.

Senate Majority Whip John Thune (R-S.D.), the party’s chief vote-counter, said Republicans still expect to have enough support to confirm Shelton eventually, although he acknowledged that the election of Democrat Mark Kelly in Arizona is a “complicating factor.” Kelly is filling an existing Senate term and can be sworn in as senator as soon as his election is certified, which could be as early as Nov. 30, and shrink the existing GOP majority by one vote.

Sen. Martha McSally (R-Ariz.), whom Kelly defeated, told her colleagues during the closed-door Tuesday lunch that this would be her last week in the Senate, according to a person briefed on her remarks.

After Kelly takes his seat, the number of senators opposing Shelton probably would reach 51 votes, effectively sinking Shelton’s nomination.

Some Republicans on the Senate Banking Committee initially raised concerns about Shelton’s views on monetary policy and whether she could maintain the central bank’s independence.

Shelton’s nomination narrowly made it through the banking panel, which voted 13 to 12 along party lines to send the nomination to the full Senate. Romney and Collins publicly said they would oppose Shelton’s nomination soon after.

In perhaps an indication of the Republicans’ middling enthusiasm for Shelton, no GOP senators spoke on the Senate floor in favor of her nomination on Monday or as of Tuesday afternoon. McConnell praised the slate of judicial nominees that the Senate was on track to confirm, but said nothing about Shelton directly.

His counterpart, Senate Minority Leader Charles E. Schumer (D-N.Y.), was not as tight-lipped.

“Judy Shelton is not only unqualified for the job; she is a threat to our economic recovery and doesn’t belong on the Fed,” Schumer said Tuesday. “And thanks to the bipartisan coalition that opposed her nomination today, she isn’t any closer to being there.”

Chelsea Janes contributed to this report.