MIAMI (AP) — Former Florida gubernatorial candidate Andrew Gillum agreed Wednesday to pay a $5,000 fine to settle an ethics complaint that he violated civil law by accepting gifts from lobbyists, ending a lengthy investigation that hampered his campaign.

The settlement was announced just as Gillum, a Democrat, was to go before an administrative law judge in Tallahassee for a hearing scheduled to last up to three days.

During the campaign, Republican rival Ron DeSantis had repeatedly criticized Gillum over the allegations, including that the former Tallahassee mayor traveled to New York and Costa Rica with lobbyists who covered some of his travel expenses, meals, entertainment and a ticket to the Broadway show "Hamilton."

Gillum denied the accusations at the time.

In a stipulation signed with lawyers representing the state Ethics Commission, Gillum agreed to having accepted gifts worth more than $100 from lobbyists or their clients who have interests in Tallahassee. The panel agreed to drop four further counts against him, including that he accepted gifts based on the understanding they would influence his judgment.

Gillum said in a statement Wednesday that he "never knowingly violated any ethics laws. Once I was made aware of one issue, I took responsibility."

Gillum attorney Barry Richard said Gillum was admitting to receiving an hour and a half boat ride around the Statue of Liberty for a party of seven, but the stipulation signed by Gillum does not specify details of the gifts and refers more broadly to his expenses for his travel and entertainment in both New York and Costa Rica.

Lawyers for the commission declined to comment.

Ethics investigators had focused on a 2016 trip to a Costa Rica resort arranged by Gillum's lobbyist friend Adam Corey as well as Gillum's travel that year to New York, where he also met with Corey and FBI agents posing as Corey's developer clients interested in pursuing projects in the Florida capital.

News reports of an FBI investigation into corruption in Tallahassee surfaced after those trips, and Gillum previously has said the FBI told him he was not a target of that investigation.

Now a CNN commentator and a campaigner for voter registration, Gillum said he would get back to work.

"I'm eager to get back to the work of registering and reengaging 1 million new Florida voters before 2020," he said.

Copyright 2019 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.