WASHINGTON — Job interview or consultation?

A day before he was named special counsel, Robert Mueller was invited to the White House to discuss the role of FBI director with President Donald Trump — a meeting that Trump claims should have prohibited the former FBI chief from leading the investigation that imperiled his presidency.

Mueller, testifying under oath Wednesday, told lawmakers that he met with Trump about the search to fill the job, but “not as a candidate” for the position. Trump is claiming that Mueller is lying about the meeting, which the president called an “interview,” holding out Vice President Mike Pence as his witness.

But former officials familiar with the meeting said Mueller was never an applicant for the job to replace FBI Director James Comey. Trump had fired Comey a week earlier over his handling of the swirling Russia investigation.

The May 16, 2017, meeting took on renewed importance Wednesday as Trump sought to impeach the credibility of Mueller ahead of his testimony about his report on Russian interference in the 2016 presidential election and efforts on the part of Trump to impede that probe. Trump has frequently claimed that Mueller had conflicts of interest that should have prevented his service as special counsel, including the supposed job interview and Mueller’s resignation from membership in the president’s Virginia golf course in 2011.

“It has been reported that Robert Mueller is saying that he did not apply and interview for the job of FBI Director (and get turned down) the day before he was wrongfully appointed Special Counsel,” Trump tweeted Wednesday before Mueller’s testimony. “Hope he doesn’t say that under oath in that we have numerous witnesses to the interview, including the Vice President of the United States!”

Mueller disputed Trump’s account, telling lawmakers, “I was not applying for that job. I was asked to give my input on what it would take to do the job.”

Steve Bannon, the White House chief strategist at the time, told investigators that Mueller had been invited to the White House to discuss the nature of the position, and that Mueller, who had served in the role for 12 years, from 2001 to 2013, did not seek to return to the post.

Mueller’s report detailed Bannon’s account, a view shared by another former White House official familiar with the meeting who spoke on the condition of anonymity.

“Bannon recalled that the White House had invited Mueller to speak to the President to offer a perspective on the institution of the FBI,” Mueller’s report stated. “Bannon said that, although the White House thought about beseeching Mueller to become Director again, he did not come in looking for the job.”

Pence spokeswoman Alyssa Farah told The Associated Press that the vice president “was present in the Oval Office when Robert Mueller interviewed for the job of FBI Director in May of 2017.”