Former tennis star Jennifer Capriati has scored a legal victory after Florida prosecutors agreed to drop stalking and battery charges against her as part of a deal.

Capriati's ex-boyfriend, Ivan Brannan, accused her of punching him in the face at a Florida gym on Valentine's Day (14Feb) last year (13) and stalking him in the months before the incident.

She was charged with the misdemeanours in March (13).

As part of the deal, Capriati agreed to serve 30 hours of community service and attend four hours of anger management counselling.

Mike Edmondson, spokesman for the Palm Beach County state attorney's office, says, "Those are standard conditions for a deferred prosecution.''

She attended the classes last week (ends10Jan14) and performed her community service at Florida Hospital Pepin Heart Institute in Tampa, according to the Associated Press.