A Polish court has dismissed charges against a well-known writer who called President Andrzej Duda a "moron".
Jakub Żulczyk had faced a potential three-year prison sentence for insulting Poland's head of state in a social media post.
But a regional court in Warsaw has decided to drop the charges against Żulczyk and discontinue the case. Judges said that a conviction could infringe free speech rights in Poland and prevent the authorities from being criticised in the future.
“The defendant did not commit any crime, so he may not be punished,” Judge Tomasz Julian Grochowicz said on Monday.
Grochowicz added that public positions such as the country's president “must involve a larger risk of public criticism”.
The decision has been welcomed by many commentators in Poland, but the ruling Law and Justice (PiS) party has stated that the verdict “disrupts the public debate” and “legitimises hate speech".
A spokesperson for President Duda had previously stated that their office had made no request for the writer to be charged and that the case had been brought by a private complainant.
Żulczyk had criticised Duda for the manner in which the Polish President had reacted to the electoral victory of his US counterpart Joe Biden.
Duda -- a close ally of Biden's predecessor Donald Trump -- had congratulated Biden but tweeted saying that Poland would "await the nomination by the Electoral College".
As many other European leaders congratulated Biden, Duda was criticised for suggesting that the Democrat's victory was somehow not definitive and that the Electoral College could still change the result.
In a post on Facebook, Żulczyk said that Biden had clearly won the election and labelled Duda "a moron".
Poland has previously been criticised for its broad insult laws, including those on offending religious feelings or insulting the country's flag. However, those found guilty of charges are usually handed fines or community service as a punishment.
Żulczyk had said that he was probably "the first writer in this country in a long time to be tried for what they wrote”.
Żulczyk -- best known for screenwriting the popular TV series Blinded by the Lights -- had denied the charge and stated his message was a "critical assessment of the president's actions".