US secret services have arrested a man who allegedly threatened to kill President Obama in a series of Twitter messages.
Donte Jamar Sims, 21, was arrested in Charlotte, North Carolina - where the Democratic National Convention was held - and has been detained in police custody, CNN reported.
"Well IMA assassinate President Obama this evening," he tweeted on the morning of 3 September, before the convention started.
When a follower asked: "U serious?" Sims replied, "As a heart attack."
"Ima hit president Obama with that Lee Harvey Oswald swag," he added.
Oswald was the man said to have killed US president John F Kennedy in 1963.
Sims, an African American, told authorities he was on drugs when he posted the death threats and that he did it as he hated Obama.
"The secret service is gonna be defenseless once I aim the assault rifle at Barack's forehead," he wrote.
He admitted responsibility for the Twitter account on which the threats were posted. He allegedly smiled when they were read out to him.
"Sims stated that he published the statements because he hated President Obama. [He] asserted that he was high on marijuana when he made the threats but that he understood what he was doing and that it was wrong," an agent wrote in the affidavit.
Sims later apologised for what he did, the agent said.
If convicted, Sims faces a maximum of five years in prison and a $250,000 fine.
Obama attended the Democratic National Convention in charlotte, where he has accepted his official nomination for a second presidential term.
Obama made a passionate appeal to US citizens to re-elect him in the November elections. His speech was preceded by speeches from Michelle Obama and former US president Bill Clinton.