TALLAHASSEE, Fla. — Florida’s top elections official abruptly resigned Thursday after a newspaper obtained pictures of him in blackface dressed as a Hurricane Katrina victim at a 2005 party.

Secretary of State Michael Ertel, who had been on the job less than three weeks, resigned just hours after he testified about election lawsuits before a state legislative committee.

The Tallahassee Democrat obtained pictures taken at a Halloween party 14 years ago that show Ertel dressed in blackface while wearing earrings, a New Orleans Saints bandanna and fake breasts under a purple T-shirt with “Katrina Victim” written on it. The photos were taken two months after the deadly storm ravaged the Gulf Coast region and eight months after Ertel was appointed Seminole County supervisor of elections. The newspaper hasn’t said how it got the photos or identified the source.

Ertel was the Seminole elections supervisor until new Gov. Ron DeSantis picked him last month to take over the department that oversees elections.

DeSantis said Ertel regretted dressing up in blackface, but he said that he was right to step down after the pictures emerged.

“I want people to be able to lead and not have any of these things swirling around,” said DeSantis, who was in Marianna to discuss hurricane relief efforts for areas hit hard by Hurricane Michael in October.

Ertel was appointed Seminole elections supervisor by then-Gov. Jeb Bush in February 2005 and won four elections to keep the office.

Ertel played a role in DeSantis’ decision to suspend Palm Beach County supervisor of elections Susan Bucher last week. Ertel recommended the governor take action against the Democratic official, contending that she had violated state election laws and was incompetent. Democrats have sharply criticized Bucher’s suspension as being politically motivated.

DeSantis last year defeated Tallahassee Mayor Andrew Gillum, who was seeking to become Florida’s first black governor. Gillum questioned DeSantis’ association with people seen as racially divisive. DeSantis also came under fire for a comment he made in late August where he said that Florida voters shouldn’t “monkey this up” by supporting Gillum.