Matt Gaetz, the former representative whom President-elect Donald J. Trump wanted as his attorney general, has withdrawn from consideration.
Sexual misconduct allegations against Mr. Gaetz had drawn much scrutiny, including from senators who would vote to approve him for the position.
Vice President-elect JD Vance had urged Senate Republicans to support Mr. Gaetz in meetings in the Capitol on Wednesday.
Republicans on the House Ethics Committee voted against releasing the panel’s report into sexual misconduct and illicit drug use allegations against Mr. Gaetz.
Mr. Vance is accompanying another administration nominee to meetings on Capitol Hill on Thursday: Pete Hegseth, the candidate for defense secretary. Mr. Hegseth is also facing sexual misconduct allegations, stemming from a 2017 encounter he asserted was consensual.
Gaetz’s withdrawal follows revelations in a sex-trafficking inquiry.
Matt Gaetz, who faced a torrent of scrutiny over allegations of sex trafficking and drug use, abruptly withdrew his bid to become attorney general on Thursday in the first major political setback for President-elect Donald J. Trump since his election this month.
Mr. Gaetz has consistently denied the allegations, but his prospective nomination ran into trouble in the Senate, where Republicans were deeply reluctant to confirm someone to run the same Justice Department that once investigated him for allegations of sex trafficking an underage girl even though no charges were brought.
In announcing his withdrawal a day after visiting the Senate, Mr. Gaetz insisted that he had strong support among fellow Republicans.
But two people with direct knowledge of Mr. Gaetz’s thinking said he made the decision to pull out after concluding that he would not have the votes in the Senate for confirmation.
The people asked for anonymity to discuss his private decision-making.
Sexual misconduct allegations against Matt Gaetz had drawn scrutiny after Mr. Trump said he wanted to nominate him for attorney general.
“While the momentum was strong, it is clear that my confirmation was unfairly becoming a distraction to the critical work of the Trump/Vance Transition,” Mr. Gaetz wrote on social media.
“There is no time to waste on a needlessly protracted Washington scuffle, thus I’ll be withdrawing my name from consideration to serve as Attorney General. Trump’s DOJ must be in place and ready on Day 1.”
He added : “I remain fully committed to see that Donald J. Trump is the most successful President in history.
“I will forever be honored that President Trump nominated me to lead the Department of Justice and I’m certain he will Save America.”
Mr. Trump responded with his own social media post expressing appreciation for Mr. Gaetz.
“Matt has a wonderful future, and I look forward to watching all of the great things he will do,” the president-elect wrote.
Mr. Trump did not indicate who he might select as attorney general instead.
The collapse of Mr. Gaetz’s selection underscored the haphazard way that Mr. Trump has gone about assembling his new administration.
He picked Mr. Gaetz almost on a whim last week without extensive vetting, knowing that allegations were out there, but essentially daring Senate Republicans to accept him anyway.
What remained unclear on Thursday was whether Mr. Gaetz’s withdrawal will embolden Senate Republicans to challenge other contentious cabinet choices, such as Pete Hegseth, the Fox News host tapped for defense secretary, or Robert F. Kennedy Jr., the conspiracy theorist and vaccine skeptic selected for secretary of health and human services.
Mr. Hegseth has been accused of sexual assault, but denies it, while Mr. Kennedy has been accused of groping a family babysitter, which he has said he does not remember doing.
The storm surrounding Mr. Gaetz had drawn attention away from some of the other contested picks.
Mr. Gaetz, who represented Florida in the House until being tapped by Mr. Trump, had been one of the most unpopular Republicans in the Capitol, particularly after instigating the far-right revolt that toppled Speaker Kevin McCarthy. (New York Times)