Morocco's King Mohammed VI has pardoned a man who had been imprisoned for creating a fake Facebook profile of a royal prince.

Fouad Mourtada, 26, walked free from jail Tuesday evening, after languishing behind bars since early February.

His sister, Amina Mourtada, said Wednesday she had been in contact with her brother and that he seemed to be in good spirits.

"I congratulated him and hoped that he was OK, and told him to look to the future and forget about the past," Amina, a Toronto engineer, told CTV.ca.

Mourtada had been convicted of "modifying and falsifying information technology data and usurping an official's identity," for creating a false profile of Moroccan Prince Moulay Rachid on Facebook, a popular social networking site.

Prince Moulay Rachid is the younger brother of King Mohammed VI.

Mourtada said he only created the Facebook profile as a tribute to the prince, not to steal his identity, and his family pleaded for leniency.

On Wednesday, Amina Mourtada thanked the king for pardoning her brother, saying he had a "good heart."

"We always believed he wouldn't let such a thing happen to an innocent man," she said. "We're very thankful for the royal pardon, and would like to thank the royal family."

Amina Mourtada also thanked the thousands of supporters who organized themselves on the same website that landed her brother in trouble: Facebook. She helped create a group on the site called "Help Fouad Mourtada," which drew more than 5,600 members.

Another 8,600 people signed an  for Mourtada's release, at the website .

"It was the solidarity of the people, and all the different organizations and supporters and citizens of the world," she said.

News of Mourtada's freedom spread quickly on the Facebook group and members had already posted dozens of messages by Wednesday.

"This is spectacular. All the people in this group have something to be proud of!" read one.