MIAMI (AP) — A South Florida man has been sentenced to three years' probation for posting threats against President Barack Obama on Facebook.

U.S. District Judge Marcia Cooke ruled Wednesday that 21-year-old Joaquin Serrapio had acted wrongly but there was no evidence he intended to carry out the threats. Prosecutors agreed to the probation. Serrapio pleaded guilty in May to threatening to kill or harm the president.

One post threatened to put a bullet in the president's head. Another asked for help with a presidential assassination. The threats were posted in February to coincide with a speech Obama gave at the University of Miami.

Serrapio wrote a letter of apology to Obama, calling his actions "childishly stupid." Cooke ordered Serrapio to post a Facebook message explaining what happened.