WEST PALM BEACH, Fla. (AP) - Authorities have released a 25-year-old South Florida man from jail after acknowledging they arrested the wrong person on a charge of first-degree murder.

Deputies detained Julio Gomez for driving without a license and then learned a man by the same name was wanted for the murder a teenager in 2008. A witness identified Gomez through a photo.

Now Palm Beach deputies acknowledge they arrested the wrong Julio Gomez.

The man investigators detained has a different birth date, and colleagues gave affidavits saying the agricultural worker had consistently lived and worked with them.

Gomez was incarcerated for more than five months. A sheriff's spokeswoman said he was immediately arrested after what they call a "series of unfortunate events."