(CNN) -- A computer engineer accused of posing as a member of the Moroccan royal family on the social networking Web site, Facebook, has been sentenced to three years in prison.
A court in Casablanca imposed the sentence on Fouad Mourtada, 26, on Friday, the state news agency said.
Mourtada was charged with stealing the identity of Prince Moulay Rachid, the younger brother of the Moroccan king, and of forging computer documents.
Lawyers for Mourtada, who said he created the profile as "a joke, a gag," said they would appeal the sentence.
Since Mourtada's arrest this month, bloggers in Morocco and across Europe have rallied behind him. At least seven fake profiles for the prince popped up on Facebook.
In a Web site that his family started, www.helpfouad.com, Mourtada is quoted as saying the following to relatives who visited him in jail: "I never thought that by creating a profile of his Highness Prince Moulay Rachid I am harming him in any way.
"I, as a matter of fact, did not send any message from that account to anyone. It was just a joke, a gag. ... I am not an evil doer; my ambition in the life was simply to have a stable job and a normal life."
Facebook, like Myspace.com, is a social networking site that allows users to create personal profiles. They can then connect with one another, upload photos and share links. The Web site boasts more than 60 million active users.
There are fake profiles galore on Facebook, with dozens for U.S. President George W. Bush and a handful for Mother Teresa.
In addition to the prison sentence, the court fined Mourtada 10,000 Dirhams ($1,304), Maghreb Arabe Presse reported.
King Mohammed VI and members of his royal family do not maintain Web sites or blogs, MAP said. The only source of official information on the family is through the north African country's news agency, it said. E-mail to a friend