Media playback is unsupported on your device Media caption Trump's nominee for judge can't answer basic legal questions

US President Donald Trump's latest judiciary nominee has withdrawn his name after failing to answer basic legal questions at his Senate confirmation hearing.

Video of Matthew Petersen's embarrassing encounter went viral.

"It has become clear to me over the last few days that my nomination has become a distraction," Mr Petersen wrote in a letter.

Mr Petersen was nominated as a federal judge in the District of Columbia.

Mr Trump had accepted his offer to withdraw, the White House said.

Mr Peterson, a Republican member of the Federal Election Commission, is the latest of Mr Trump's conservative judicial nominations to fail.

At the hearing, Mr Peterson stumbled over questions asked by Republican Senator John Kennedy.

The exchange

Senator Kennedy starts by asking Mr Petersen and the four other nominees who appeared with him: "Have any of you not tried a case to verdict in a courtroom?"

Only Mr Petersen raises his hand.

Senator Kennedy: Have you tried a jury trial?

Matthew Petersen: I have not.

Senator Kennedy: Civil?

Matthew Petersen: No.

Senator Kennedy: Criminal?

Matthew Petersen: No.

Senator Kennedy: Bench?

Matthew Petersen: No.

Senator Kennedy: State or federal court?

Matthew Petersen: I have not.

Senator Kennedy: Have you ever taken a deposition by yourself?

Matthew Petersen: Uh, I believe no.

Senator Kennedy: Just for the record, do you know what a motion in limine is?

Matthew Petersen: I would probably not be able to give you a good definition right here at the table.

The Louisiana Senator and former law professor, who still fully supports Mr Trump, openly criticised his nominee in a later TV interview.

"Just because you've seen My Cousin Vinny doesn't qualify you to be a federal judge," Mr Kennedy told local station WWL-TV, referring to the 1992 comedy film about a novice lawyer.

Mr Kennedy told the station that Mr Trump called him after learning of the exchange and agreed that Mr Peterson was too inexperienced.

Mr Peterson, who became the third of Mr Trump's judicial picks to flounder in just a week, said: "I had hoped that my nearly two decades of public service might carry more weight than my two worst minutes on television."

Despite recent setbacks, Mr Trump has made progress filling other judicial vacancies with conservative judges and notably restored the Supreme Court's conservative majority with the appointment of Justice Neil Gorsuch.