A Florida man who police said was trying to help a missing toddler locate her parents over the weekend ended up beaten and shamed on social media by the child's family members after they mistook him for a kidnapper, according to a report.

The good Samaritan, who was not identified by authorities, was attempting to help a 2-year-old who had become separated from her parents while attending a baseball game at the Southwest Sports Complex in Lakeland, Florida, on Saturday, but her parents "feared that the citizen was attempting to kidnap the child," the Lakeland Police Department said in a statement Tuesday.

"At least one independent witness stated they observed the citizen walking with the child trying to help find her parents," police said. "The parents were alerted by bystanders that the citizen was walking towards a playground, which is near the parking lot, and feared that the citizen was attempting to kidnap the child. This was not the case."

The police department said it "thoroughly investigated" the incident and concluded that the man committed no crime.

However, he ended up being attacked by the child's father, who admitted to punching him repeatedly, according to ABC affiliate WFTS.

"When I got there, I just swung on him," the father told WFTS. He acknowledged that he really didn't know whether the man was looking to kidnap his daughter but he said he doesn't regret assaulting him.

"You don't pick somebody's kid up in that direction, towards the parking lot, whether you were going towards the parking lot or not," the toddler's father said.

The good Samaritan, who police identified as a father and a local businessman, was also targeted in a social media smear campaign, according to WLS. The station reported that the toddler's family posted the man's name, photo and place of employment online, referring to him as a child predator.

The man has reportedly opted against pressing charges against members of the family.

The Lakeland Police Department did not confirm assault allegations, but it appeared to use the incident to educate the public about the dangers of posting or sharing inaccurate information on Facebook.

"Accounts of this incident have circulated on social media with false information and speculation," the department said in its statement Tuesday. "Be careful about what you post on social media so as not to victimize an innocent person."