Former Hillsborough County Circuit Judge Ashley Moody will replace her friend, term-limited Attorney General Pam Bondi, as the state’s next top lawyer.

Moody on Tuesday defeated state Rep. Sean Shaw, a Tampa Democrat whose father was the first black chief justice of the Florida Supreme Court, in the contest for attorney general.