What was Dinesh D'Souza charged with? A look at the conservative filmmaker Trump plans to pardon

President Trump announced plans to give conservative filmmaker Dinesh D'Souza, who was convicted of making an illegal campaign contribution in 2014, a "full pardon" on Wednesday.

D'Souza, 57, pleaded guilty to campaign finance fraud after donating $20,000 to New York politician Wendy Long, a Republican, during her Senate race in 2012. He was indicted two years later, in January 2014, for using a “straw donor,” a person who makes illegal contributions to a campaign in the names of others, to make the donation.

As a result, D'Souza was sentenced to five years probation, eight months in a "community confinement center," weekly counseling sessions and given a $30,000 fine.

TRUMP TO GIVE 'FULL PARDON' TO DINESH D'SOUZA

"He was treated very unfairly by our government!" Trump said in a tweet Wednesday, which was then retweeted by D'Souza.

At the time, D'Souza's attorney, Benjamin Brafman, told The Washington Post in a statement that D'Souza did not have any "criminal intent" — it was simply an "act of misguided friendship."

“He and the candidate have been friends since their college days," Brafman explained to the newspaper. "It is important to note that the indictment does not allege a corrupt relationship between Mr. D’Souza and the candidate.”

HOW DO PRESIDENTIAL PARDONS WORK?

D'Souza will become the fifth person Trump has pardoned since taking office, following behind former Arizona Sheriff Joe Arpaio, former Navy sailor Kristian Saucier, former Vice President Dick Cheney's aide Scooter Libby and the late Jack Johnson, boxing's first black heavyweight champion.

Here's what you need to know about the charges D'Souza faced.

What was he charged with?

D’Souza was charged with one count of illegally donating to a Senate campaign and one count of causing false statements to be made to authorities in connection with the contributions.

“D’Souza attempted to illegally contribute over $10,000 to a Senate campaign, wilfully undermining the integrity of the campaign finance process. Like many others before him, of all political stripes, he has had to answer for this crime – here with a felony conviction," then-Manhattan U.S. Attorney Preet Bharara said in a statement in September 2014.

DINESH D'SOUZA GOT A FELONY CONVICTION FOR ILLEGAL CAMPAIGN DONATIONS; WILL ROSIE O'DONNELL GET THE SAME TREATMENT?

In 2012, the Federal Election Campaign Act limited campaign contributions to $5,000 from "any individual to any one candidate," the indictment stated.

D’Souza gave Long $5,000 from himself and another $5,000 from his wife in March 2012. Months later, he asked others — an assistant and romantic interest — to donate to Long's campaign on behalf of themselves and their spouses, promising to later reimburst them $20,000 in cash, the U.S. Attorney's Office said in a statement online.

"When confronted by Ms. Long, D’Souza initially misled the candidate before admitting what he had done," the statement adds.

D'Souza's actions caused the campaign committee to submit "materially false, fictitious, and fraudulent statements" to the Federal Election Commission regarding the sources of the campaign contributions.

In total, Long's campaign raised less than $1 million for her losing fight against now Sen. Kirsten Gillibrand, D-N.Y., The Washington Post reported.

Fox News' Brooke Singman and The Associated Press contributed to this report.