A Chinese writer who has been linked to an online petition calling for the Chinese president's resignation has been released.

Jia Jia, who was taken away by police on March 15, told friends Friday night in a private social media group that he is safe. His lawyer Yan Xin on Saturday confirmed to The Associated Press that Jia is free and can return home any time.

Yan says he hopes that Jia's release is proof that his client had nothing to do with the anonymous letter calling for President Xi Jinping's resignation. The letter briefly appeared on a government-controlled news site.

Jia's friends believe he may have unwittingly implicated himself when he warned an editor friend about the publication of the letter.