A Moroccan court on Friday jailed a teenager for three months for threatening to kill US President Barack Obama on Twitter, judicial sources said.
The 17-year-old identified as Soufiane I. pleaded guilty at a Casablanca court to "electronic crimes" and "calling for violence via electronic media," after posting the death threat last year.
"I will kill your president and everyone in his company. It's what I'm going to do when I arrive in the United States next month," the youth wrote on his Twitter feed.
The teenager was arrested around two months ago in Casablanca.
He is due to serve his sentence at the city's Oukacha juvenile detention centre, the judicial sources told AFP.
The court hearing was closed to the media, and it was not immediately known whether the young Moroccan's lawyers planned to appeal.
Time spent in pre-trial detention is normally deducted from jail sentences in Morocco.