After a nearly five-year court battle, a world-renowned Turkish pianist has been acquitted of charges that he "denigrated religious beliefs" in messages on his Twitter account.

Fazil Say announced the acquittal on his Instagram account Wednesday. His 2012 tweets included a joke about a shortened call to prayer, mentioning a traditional alcoholic drink as well as verses from famous medieval poet Omar Khayyam.

According to state-run Anadolu News Agency, which also carried the news, Say was sentenced to 10 months in prison in 2013, but was released on probation for five years.

He was retried on appeal and handed a 10-month suspended sentence. The Supreme Court of Appeals reversed that ruling last year on "freedom of expression" grounds.  

 Say wrote on Instagram the case would have set a wrong precedent.