A Polish man on Wednesday was sentenced to four months in jail for assaulting the Danish prime minister as well as separate sexual harassment charges. He will also be deported and banned from returning to Denmark for the next six years.

The unidentified 39-year-old man, held in pretrial custody since the assault, has been charged with punching Prime Minister Mette Frederiksen's right shoulder with a clenched fist, causing her to lose her balance but not fall. Frederiksen suffered whiplash at the time.

DENMARK'S PRIME MINISTER FREDERIKSEN ASSAULTED IN COPENHAGEN, MAN ARRESTED

The Copenhagen District Court issued the sentencing, which the defendant didn't appeal. The court said the assault "emphasized the nature of the violence and that the violence against the prime minister occurred in connection with her performance of her duties as prime minister."

The man had also confessed before the court to other charges, including sexual harassment by exposing himself to passing people and groping a woman at a commuter train station, and fraud involving deposit-marked bottles and cans at two supermarkets.

Denmark Assault

Denmark's Prime Minister Mette Frederiksen attends a ceremony at the Danish monument outside of Sainte Marie du Mont, Normandy, Thursday, June 6, 2024.  (AP Photo/Jeremias Gonzalez)

Prosecutor Anders Larsson on Wednesday demanded four months in jail for assaulting the prime minister and for exposing his private parts to passersby, saying while his sexual acts were not gross, they "were certainly uncomfortable" for those seeing it, according to public broadcaster DR.

"His behavior and demeanor are far removed from a citizen who should be in our society," Larsson said in court, according to DR.

Frederiksen was on a private break from the Social Democratic Party’s campaign for the elections to renew the European Parliament when the assault took place on a busy downtown Copenhagen plaza. The 46-year-old prime minister, who has been in office since 2019, had been campaigning for her party’s EU lead candidate, Christel Schaldemose, who was elected. The attack was not linked to the campaign event.

The assault happened as violence against politicians in Europe spread in the run-up to the European Union elections.

CLICK HERE TO GET THE FOX NEWS APP

In May, a candidate from Germany’s center-left Social Democrats was beaten and seriously injured while campaigning.

In Slovakia, the campaign was overshadowed by an attempt to assassinate populist Prime Minister Robert Fico on May 15, sending shockwaves through the nation and reverberating throughout Europe. Fico was shot in the abdomen and seriously wounded. The suspect was immediately arrested and faces terror charges.