President-elect Donald J. Trump quickly swept aside Thursday’s bad headlines about Matt Gaetz by speedily substituting Pam Bondi, a fellow Florida Republican with a starkly different profile — but a similar reputation for fealty — to be his attorney general.

Ms. Bondi, 59, is a lobbyist and Trump loyalist who served as Florida’s attorney general from 2011 to 2019. She has charted a more conventional and less clamorous course than Mr. Gaetz, with little of the ugly personal or political baggage that led some Republicans to oppose Mr. Gaetz’s nomination.

Ms. Bondi, the daughter of the mayor of a small Tampa-area municipality, began working as an assistant state attorney in Hillsborough County in the 1990s. During 18 years as a prosecutor, she tried cases “ranging from domestic violence to capital murder,” according to the bio page at her lobbying firm.

She supervised a handful of high-profile cases, most notably one involving the former New York Mets pitcher Dwight Gooden, who served a one-year prison sentence for violating probation in a drug case in 2006.

Ms. Bondi — a Democrat until 2000 — emerged from a crowded Republican primary to win the attorney general’s race after garnering the support of Sarah Palin, the former Alaska governor and failed 2008 Republican vice-presidential nominee, and by touting her tough stance on crime during appearances on Fox News.

During her eight-year tenure, she tried unsuccessfully to overturn and weaken the Affordable Care Act, opposed expanding legal protections for the L.G.B.T.Q. community and cultivated a national reputation by supporting anti-human-trafficking efforts.