Matt Gaetz, US President-elect Donald Trump’s pick for attorney general, has withdrawn his name from consideration after coming under intense scrutiny over allegations of sexual misconduct.

Gaetz’s abrupt announcement on Thursday came a day after he tried to shore up support among the senators in Washington who will have the final say in approving Trump’s Cabinet nominees. Trump’s Republicans will hold a narrow majority of 53 of the 100 seats in the incoming Senate. A few dissenters in their own ranks would have been enough to torpedo the appointment and deal an embarrassing blow to the start of Trump’s second term.

The attorney general leads the powerful Justice Department, which is sure to play a major role in Trump’s second term.