Former FBI director James B. Comey appears before the Senate Intelligence Committee on June 8 in D.C. (Matt McClain/The Washington Post)

Former FBI director James B. Comey says President Trump asked him whether he could trust then-FBI Deputy Director Andrew McCabe after Trump criticized donations that McCabe’s wife, a state Senate candidate, received from Gov. Terry McAuliffe, a Hillary Clinton confidant.

At the time, McCabe was overseeing the bureau’s investigation into Clinton’s use of a private email server, one of Trump’s favorite topics on the campaign trail.

Some critics suggested McCabe might undermine the investigation out of misplaced loyalty to Hillary and Bill Clinton — a theory Democrats have called nonsense in part because Jill McCabe lost her local election before her husband was put in charge of the email investigation.

Comey cited what he said was Trump’s remark about McCabe Thursday during his testimony before the Senate Intelligence Committee. His comment came under questioning from Sen. Marco Rubio (R-Fla.), who asked Comey whether he thought Trump was attempting to use McCabe as leverage in his quest for Comey’s loyalty.

In an opening statement Comey released Wednesday, Comey said Trump told him “he hadn’t brought up ‘the McCabe thing’ ” because Comey vouched for McCabe as an honorable person.

Meet the candidates running to become Virginia’s next governor

Rubio asked, “Did you perceive that to be a statement that, ‘I took care of you, I didn’t do something because you told me he was a good guy, so now, you know, I’m asking you for something potentially in return.’ Was that how you perceived it?”

Comey responded that he wasn’t sure what to make of the statement.

“That’s possible, but it was so out of context that I didn’t have a clear view of what it was,” he said.

The exchange inserted a dose of local Virginia politics into a national saga over Trump and the FBI’s probe of his associates’ contacts with Russia.

In 2015, McAuliffe was doing all he could to help Democrats win the majority in the state Senate, which was then and remains now under GOP control.

Democrats hoped Jill McCabe, a pediatrician and first-time candidate, could topple state Sen. Richard H. Black (R-Loudoun), a lightning rod for controversy and one of the most conservative members of the Virginia legislature.

McAuliffe’s political action committee, Common Good VA, was McCabe’s top donor with $467,500 and the state Democratic Party was her second-highest donor with $207,788, according to the Virginia Public Access Project, a nonpartisan tracker of campaign donations.

The race was a local barnburner but barely registered outside Virginia. Then Trump stepped in.

At at rally in St. Augustine, Fla., he called the donations “absolutely disgraceful” and alleged without presenting evidence that “Hillary knew this money was being paid.”

McCabe outspent Black and still lost, costing McAuliffe the majority — by one seat.