"Mr. D'Souza was, in the President's opinion, a victim of selective prosecution for violations of campaign finance laws. Mr. D'Souza accepted responsibility for his actions, and also completed community service by teaching English to citizens and immigrants seeking citizenship," Sanders said. "In light of these facts, the President has determined that Mr. D'Souza is fully worthy of this pardon."

At the time D'Souza made his contributions, the Federal Election Campaign Act prohibited individual citizens from donating more than $5,000 to a single candidate.

D'Souza pleaded guilty in 2014 to reimbursing two of his associates after directing them to contribute $10,000 each to the failed 2012 U.S. Senate campaign of Wendy Long in New York. He also admitted that he knew what he was doing violated the law.

Trump said he will pardon D'Souza on Thursday, adding D'Souza "was treated very unfairly by our government!"

President Donald Trump said Thursday he plans to issue a pardon to Dinesh D'Souza, a prominent conservative commentator and filmmaker who was convicted of making an illegal campaign contribution.

Then-U.S. Attorney Preet Bharara announced D'Souza's conviction at the time.

"Dinesh D'Souza attempted to illegally contribute over $10,000 to a Senate campaign, willfully undermining the integrity of the campaign finance process," Bharara said. "Like many others before him, of all political stripes, he has had to answer for this crime – here with a felony conviction."

Bharara was fired by the president shortly after Trump took office in 2017, and has since become an occasionally vocal critic of the president.

In a tweet, he defended the lawsuit and conviction against D'Souza in a response to Trump's announcement to grant the pardon.

Bharara tweet

D'Souza sent a counterpunch on the social media platform, claiming that Bharara, who was born in India, "want to destroy a fellow Indian American to advance his career."

Dinesh tweet 2

Later on Thursday, Trump told reporters he was considering pardoning Martha Stewart, who was convicted in March 2004 of obstructing justice and lying to investigators regarding a stock trade she made three years earlier. Stewart served five months in jail.

The U.S. attorney for the Southern District of New York at the time was James Comey, who was fired as FBI Director in May 2017 by Trump.

Trump also said he was considering a commuted sentence for Rod Blagojevich, ex-governor of Illinois who is serving out a 14-year sentence in a Colorado prison on bribery and corruption charges.

In his 2016 film, "Hillary's America: The Secret History of the Democratic Party," D'Souza implied that his felony conviction was a politically motivated attack by the government in retaliation for an earlier film of his about the Obama administration, according to The New York Times' review of the film.

The right-wing firebrand was heavily criticized in February for mocking the students who survived the mass shooting at a Parkland, Florida, high school that left 17 students and adults dead a week earlier. He later apologized, saying his tweet "was insensitive to students who lost friends in a terrible tragedy."

D'Souza tweet

After pleading guilty, D'Souza was sentenced to spend an eight-hour day each week in community service as part of a five-year probationary term, according to the Southern District of New York. He also had to attend weekly counseling sessions and pay a $30,000 fine.

Texas Sen. Ted Cruz, an ally of both Trump and D'Souza, applauded Trump's decision in a tweet of his own.

Ted Cruz tweet

The president has used his pardon power five other times since taking office, including the controversial pardoning of former Sheriff Joe Arpaio in August 2017.

Arpaio, who had campaigned for Trump, had come under fire for the treatment of prisoners in the Maricopa County jail. The law enforcement officer, who bragged of being "America's toughest sheriff," was convicted of contempt of court in Arizona.

In April, the president also pardoned Scooter Libby, a former advisor to Vice President Dick Cheney who had been convicted of obstruction of justice, false statements and perjury.

Trump's most recent pardon was granted posthumously to Jack Johnson, who was convicted in 1913 by an all-white jury for violating a law prohibiting the transport of women across state lines for "immoral" purposes.

D'Souza did not immediately respond to CNBC's request for comment.