On the eve of a contentious battle over President Donald Trump’s second U.S. Supreme Court nominee, and with midterm elections looming, a yearslong bid to add two new judges to Minnesota’s federal bench threatened to languish even longer.

But a rare late-August deal to fast-track votes on a batch of Trump’s federal district court nominees has Hennepin County Judge Nancy Brasel and Minneapolis lawyer and law professor Eric Tostrud poised to help fill a pair of vacancies that had been deemed “judicial emergencies.” The incoming freshmen judges may have to thank someone well-acquainted with the task of getting Minnesota’s federal appointees into the jobs for which they’ve been nominated.

“Two words: Amy Klobuchar,” said Andrew Luger, a former U.S. attorney whom Klobuchar helped nominate and confirm for the post in 2014. “If you’re waiting to get confirmed, there’s nobody in Washington, D.C., you want in your corner more than Amy Klobuchar.”

Klobuchar said last week that she “worked to move [Brasel’s] nomination forward as quickly as possible” and that Brasel had “strong bipartisan support.” Klobuchar has also said Tostrud is expected to be confirmed by the end of this week.

“We needed to,” Klobuchar said last week. “It will make a difference in Minnesota.”

Trump nominated Brasel and Tostrud in February and the two cleared the Senate Judiciary Committee in May. But before last week, it was unclear when their nominations would be taken up at a time in which the U.S. Supreme Court and federal appeals court judges are being prioritized in addition to the run-up to a vital midterm election.

Part of last week’s deal to move Brasel and six other district judges out of the Senate was aimed at letting senators return to the campaign trail in their respective home states. Early responses to the deal, meanwhile, revealed a process still fraught with partisan division: The votes sparked outrage among progressives who condemned Senate Democrats for not standing in the way of the lifetime Trump appointees.

“@SenSchumer, why are you cutting a deal with Mitch McConnell to fast-track Trump judges? Why won’t you #WhipTheVote to #StopKavanaugh? We’re fighting to protect our courts and save our democracy. We expect you to do the same,” tweeted an account linked to Indivisible, a progressive grass-roots nonprofit that also referred to Brett Kavanaugh, whose U.S. Supreme Court nomination goes before a Senate committee this week.

But both of Minnesota’s nominees represent a far cry from some of the more polarizing jurists considered since Trump took office last year. Brasel, a former federal prosecutor, was appointed to the Hennepin County bench by DFL Gov. Mark Dayton in 2011. Tostrud is close to Republican U.S. Rep. Erik Paulsen but does not claim membership to either of the conservative special interest groups that have been key in helping the White House make its mark on the federal courts.

“You’ve heard the term ‘lawyer’s lawyer’? Eric is more like a lawyer’s law professor,” said Charles Nauen, a Minneapolis attorney who has worked with Tostrud since the late 1980s.

Tostrud has maintained a complex commercial litigation practice at Nauen’s law firm while teaching extensively on federal jurisdiction and federal court procedure at Mitchell Hamline School of Law and at the University of Minnesota’s law school.

Luger said he worked on the majority of his cases at the Greene Espel law firm in Minneapolis alongside Brasel in the 10 years the two were colleagues at the firm.

“Nancy fits right in,” Luger said. “We have a collegial, intelligent, experienced bench and she gets along with almost everybody. … She will take what is a cohesive federal family and make it even that much more.”

Carl Tobias, a University of Richmond law professor who closely watches judicial selection, said August confirmations are indeed rare because the Senate usually recesses for most of that month. Tobias said strong backing from Minnesota’s senators and the lack of controversy surrounding their appointments helped swiftly move along Brasel’s and Tostrud’s nominations.

That they would help fill two seats open since 2016 also may have also boosted their chances, Tobias said. The two judgeships vacated by now-Senior Judges Ann Montgomery and Donovan Frank met the criteria for “judicial emergencies” in a district that often ranks among the busiest in the Eighth Circuit — Minnesota’s overall federal caseload has climbed nearly 50 percent since 2013.

“They desperately need the kind of talent and hard work that both Judge Brasel and hopefully soon-to-be Judge Eric Tostrud will bring,” Nauen said.