A French court on Thursday handed down a tough four-month prison sentence for the person who slapped President Emmanuel Macron.

The Valence city court convicted the 28-year-old, Damien Tarrell, of assaulting a person in charge of public authority, and sentenced him to 4 months in prison with strict enforcement and 14 months with a suspended sentence, according to the French BFM TV website.

The court also banned Tarrell from holding any public office for the rest of his life, and banned his possession of weapons for five years.

Tarrell's verdict came just two days after the accident took place in the Drôme region in southeastern France.

During the session, Tarrell said that he "did not plan to slap the president in advance, but he was disgusted when he saw the president's hypocritical looks that wanted to make him one of Macron's voters and slapped him," Euronews reported.

Tarrell, an unemployed fencing fan who says he sympathizes with the right, told the court that he did so because the president stood with all that was against France.

A video was released of the moments of the attack, which took place on Tuesday, showing Macron heading towards a group of citizens who were waiting for him during a visit to the region.

As he approached a group of citizens, Tarrell grabbed Macron's hand and slapped him hard in the face with his second hand, while chanting "Down with the macaroni."

Following the incident, the police arrested Tarrell and his friend Arthur C., who filmed the incident.

At the home of Tarrell's friend, police found old books on the art of war and Adolf Hitler's "Mein Kampf", as well as a red flag with a yellow hammer and sickle and a flag of the Russian Revolution.

Alex Perrin, the Valence District Attorney, said in a statement that Arthur C "will appear in court at the end of 2022 on charges of illegal possession of weapons."

In an interview with French television network BFM on Thursday, Macron did not comment on the trial, but stressed that "nothing ever justifies violence in a democratic society."

He added that we should not give this stupid and violent act more than its size.