Donald Trump on Friday became the first former president of the United States to be convicted of a felony after a court in New York found him guilty in a case pertaining to illegally influencing the 2016 presidential election, reported the Associated Press.

The United States defines a “felony” as a crime that is punishable by death or imprisonment for over a year.

Trump has been convicted of falsifying business records during his 2016 presidential campaign bid to cover up a $130,000 payment to adult film actor Stormy Daniels through his then-lawyer Michael Cohen to keep her from going public about a sexual encounter she claimed to have had with him.

Prosecutors alleged that this was an effort to interfere with the elections. They said that Cohen paid Daniels through a shell company before being reimbursed by the Trump Organization, which recorded the reimbursements as legal expenses, according to AP.

On Friday, the court found him guilty on 34 felony charges.

“This was a rigged, disgraceful trial,” Trump told reporters after leaving the courtroom. “The real verdict is going to be November 5 by the people [US presidential elections]. They know what happened, and everyone knows what happened here.”

The Republican leader is seeking to run for the post of president once again this year.

The quantum of punishment for Trump will be announced on July 11. The conviction for falsifying business documents carries a maximum sentence of four years in prison, reported Reuters. However, those convicted often receive shorter sentences, fines or probation.

Trump’s conviction and potential imprisonment do not bar him from contesting the polls.