DUBAI, United Arab Emirates (AP) — A Saudi Arabian court sentenced a prominent lawyer to three months in prison on Tuesday, a rights group said, while the same day a Saudi writer was released from jail after being investigated for blasphemy.

The two detentions point to what rights groups say is a pattern of violations against activists and writers for peacefully exercising freedom of speech. Political dissent and criticism of the state is not generally tolerated and independent local human rights groups are not given licenses to operate.

Amnesty International said last week in a report titled "Saudi Arabia: Unfulfilled Promises" that torture and ill-treatment is frequently used to extract "confessions" from detainees and legal proceedings fall short of ensuring fair trials, with people charged under vaguely-related offenses such as "disobeying the ruler."

The most recent verdict in the kingdom sentenced lawyer Waleed Abu al-Khair to three months in prison for signing a statement calling for reforms in the kingdom, according to the London-based Institute for Human Rights in Saudi Arabia.

The statement signed by him and around 50 others condemned long prison sentences given in 2011 to men who were detained in 2007. The statement also called for the right to peaceful assembly and for an end to police shootings of Shiite Muslim protesters in eastern Saudi Arabia. It was signed in 2011 during the height of the Arab Spring uprisings that toppled autocratic governments across the region.

The Institute for Human Rights in Saudi Arabia says Abu al-Khair told them he plans to appeal the conviction. Abu Al-Khair faces a separate trial and a possibly long prison sentence on charges of challenging Saudi Arabia's monarchy and ruling institutions.

In the second case, poet and journalist Hamza Kashgari was released from prison after a year and eight months following an investigation into statements he made on Twitter allegedly insulting the Prophet Muhammad, his lawyer Abdel-Rahman el-Lahem said in a statement to reporters Tuesday.

The kingdom's mufti and other top clerics said at the time that Kashgari should be put on trial, and he could have faced the death penalty if found guilty of apostasy. Fearing for his life, Kashgari fled to Malaysia shortly after in early 2012, but authorities there detained him and sent him back to Saudi Arabia.

Saudi authorities had no immediate comment on either case.