The offenses are no longer illegal and the settlement money has already been allocated, but Miami-Dade on Wednesday approved a long-awaited settlement with Uber and Lyft over nearly $5 million in fines from when the ride-hailing companies first launched in Miami.

The San Francisco-based transportation companies launched their services in the Miami area in 2014, well before they successfully lobbied a rewrite of the county’s taxi laws to legalize app-based hailing of paid rides. By the time Miami-Dade legalized ride-hailing in May 2016, Uber drivers had racked up county fines topping $4 million and drivers for its smaller rival Lyft had amassed fines of nearly $400,000.

In November 2017, Miami-Dade commissioners gave tentative approval for settling the fines — which Lyft and Uber both disputed — at a deep discount. That settlement, for 56 cents on the dollar, was approved Wednesday by the 13-member board. Commissioner Rebeca Sosa was the lone objector. “Uber and Lyft violated the rules of this county,” she said before voting against the settlement.

The 2017 commission approval of a settlement framework left the administration of Mayor Carlos Gimenez to negotiate settlement contracts that were ratified Wednesday. The payout will mean about $2.6 million to Miami-Dade, plus another $300,000 for fees paid to the courts.

The county money has already been allocated under terms commissioners approved in 2017.

The Miami Children’s Museum gets $500,000. Another $500,000 from the settlement helps pay for the planning of a black history museum. The Miami-Dade Veterans Court receives $100,000, and the more than $1 million that remains goes to the county’s Affordable Housing Trust Fund.

Uber and Lyft lawyers said they planned to fight each of the nearly 4,468 citations in court, meaning the county faced a tedious legal battle to collect the full amount. Commissioner Sally Heyman, a lawyer, said the county should be happy with the discounted payout.

“We did not stand in a great legal posture,” she said. “As much as I say we want as much money as we can get … I find this very fair and favorable.”