A popular Polish writer and journalist could face up to three years in prison for calling President Andrzej Duda a “moron” in a Facebook post.
Jakub Zulczyk accused Mr Duda of failing to understand the US electoral process in a tweet to Joe Biden.
Mr Duda’s tweet stopped short of recognising his victory, pending Electoral College confirmation, but hailed his “successful campaign”.
Poland has made it a crime to insult state leaders and religion.
Following US media reports of a presidential victory for Mr Biden on 7 November, President Duda tweeted: “Congratulations to Joe Biden for a successful presidential campaign.
“As we await the nomination by the Electoral College, Poland is determined to upkeep high-level and high-quality PL-US strategic partnership for an even stronger alliance.”
“Joe Biden is the 46th president of the USA,” he wrote, adding: “Andrzej Duda is a moron.”
The text used in the post was deemed offensive and unacceptable, prosecutors said.
Mr Zulczyk said he first learned of the charges against him through the media.
A well-known author in Poland, Mr Zulczyk’s 2014 novel Blinded by the Lights was later made into a TV series for HBO Europe.
Poland has nine different insult laws, including one that covers state symbols, and they all come with potential prison terms.
It is possible to be imprisoned in the country for insulting not only the Polish flag but also those of foreign countries.