Vice President Pence on Wednesday cast the tie-breaking vote in the Senate to advance the nomination of Thomas Farr, who was nominated by President Trump to be a judge North Carolina’s Eastern District and has drawn staunch opposition from Democrats.

Pence was needed after Sen. Jeff Flake, R-Ariz., voted against Farr to protest the GOP leadership’s decision to block a unrelated bill to protect special counsel Robert Mueller. In the 51-49 Senate, Flake's opposition created a 50-50 tie that was broken by Pence.

That vote set up a final vote on Farr that is expected later this week.

Pence has been needed to break tie votes on several occasions, although it should get easier for Republicans next year, when they'll have a 53-47 majority. Flake, a constant critic of Trump's, is retiring after this year and won't hold a Senate seat.

Farr has been awaiting final confirmation since January, when the Senate Judiciary Committee approved him along party lines.

Democrats and civil rights groups have aggressively opposed the nomination based on Farr’s past work defending North Carolina’s voter ID law, which was invalidated by a federal court for suppressing black votes.

Senate Minority Leader Chuck Schumer, D-N.Y., has been leading the effort to push at least one Republican to oppose Farr, which would sink his nomination.

“Thomas Farr worked hand-in-hand with North Carolina’s Republicans in their efforts to undermine voting rights generally and deny African-Americans access to the ballot,” Schumer said during a Senate floor speech. “He must not be confirmed as a federal judge in North Carolina.”

Republicans have defended Farr’s legal work and argued he is well-qualified for the federal bench.