U.S. President Donald Trump said he will grant a full pardon on Thursday to conservative commentator Dinesh D'Souza, who was sentenced in 2014 to five years of probation for federal campaign law violations.

Trump made the announcement Thursday morning on Twitter.

Will be giving a Full Pardon to Dinesh D’Souza today. He was treated very unfairly by our government! —@realDonaldTrump

D'Souza, 53, admitted in May 2014 that he illegally reimbursed two "straw donors" who donated $10,000 US each to the unsuccessful 2012 U.S. Senate campaign in New York of Wendy Long, a Republican he had known since attending Dartmouth College in the early 1980s.

At the time, the government said a prison sentence of 10 months to 16 months was appropriate for D'Souza, and necessary to deter others from abusing the election process, including "well-heeled individuals who are tempted to use their money to help other candidates."

D'Souza waited to "the last possible moment" prior to trial before admitting guilt, the government said, and then went on television shows and the internet to say he was "selectively" targeted for prosecution, and had little choice but to plead

guilty.

The case against D'Souza, a critic of Democratic former president Barack Obama, prompted some conservatives to accuse the government of selective prosecution. The prosecutor in the case, then-U.S. Attorney Preet Bharara in Manhattan, was an Obama appointee. Bharara was later fired by Trump.

On Twitter Thursday, D'Souza thanked the current president and reacted to Bharara, who said D'Souza "intentionally broke the law, voluntarily pled guilty, apologized for his conduct & the judge found no unfairness."

Bharara & his goons bludgeoned me into the plea by threatening to add a second redundant charge carrying a prison term of FIVE YEARS <a href="https://t.co/5Z4UjWaHtF">https://t.co/5Z4UjWaHtF</a> —@DineshDSouza

D'Souza was born in Mumbai and became a naturalized U.S. citizen in 1991. He wrote the bestsellers The Roots of Obama's Rage in 2010 and America: Imagine a World Without Her this year, and in 2012 co-directed the film 2016: Obama's America.

Previous instances

Trump has issued several other pardons during his presidency.

Joe Arpaio, the self-proclaimed "toughest sheriff in America," received one last August, less than a month after he was convicted of criminal contempt in a case involving his department's racial profiling policy.

Trump told reporters during an Air Force One flight to Texas on Thursday that he is considering commuting the sentence of ex-Illinois governor Rod Blagojevich and pardoning talk show host Martha Stewart.

Trump said Blagojevich said something dumb but that "lots of politicians" do and he thought his sentence was excessive. The Democratic former governor began serving his 14-year prison sentence on corruption convictions in 2012. His scheduled release date is 2024.

Lauren Kaeseberg, a trial attorney for Blagojevich, told The Associated Press she thinks the sentence was too harsh. Blagojevich's wife, Patti Blagojevich, also released a statement, saying she and the couple's two children have long awaited the day "when Rod could come back home where he belongs."

Blagojevich was facing charges when he was on Trump's reality TV show, Celebrity Apprentice, in 2010. As Trump "fired" Blagojevich as a contestant, he also praised Blagojevich for how he was fighting his criminal case, telling him: "You have a hell of a lot of guts."

Stewart spent five months in a West Virginia prison for lying about a stock sale and was released in March 2005 to serve another five months under home detention. In the fall of 2005, she starred in The Apprentice: Martha Stewart, a spin-off from Trump's series The Apprentice.

Hours after announcing he will pardon Dinesh D’Souza, Trump told reporters during the flight to Texas that he is considering pardoning or commuting the sentence of former Illinois Gov. Rod Blagojevich and Martha Stewart. —@kaitlancollins

In April, Trump pardoned I. Lewis (Scooter) Libby, a former top aide to one-time vice-president Dick Cheney.

Libby was convicted of lying to investigators and obstruction of justice following the 2003 leak of the covert identity of CIA officer Valerie Plame. President George W. Bush later commuted Libby's 30-month prison sentence, but didn't issue a pardon despite intense pressure from Cheney. No one was ever charged for the leak.

And last week, Trump granted a rare posthumous pardon to Jack Johnson, boxing's first black heavyweight champion. The pardon cleared Johnson's name more than 100 years after what many viewed as his racially charged conviction in 1913 for traveling with his white girlfriend.