WASHINGTON (Reuters) - President Donald Trump on Thursday pardoned a conservative commentator and said he was considering pardoning lifestyle maven Martha Stewart and commuting a former Illinois governor’s prison sentence, prompting critics to accuse him of subverting the rule of law.

Trump announced on Twitter his decision to pardon pundit and filmmaker Dinesh D’Souza, who pleaded guilty in 2014 to U.S. campaign finance law violations and was an outspoken critic of Democratic former President Barack Obama, saying he had been “treated very unfairly by our government!”

The Republican president then told reporters on a flight to Houston he was also considering a pardon for Stewart, who was convicted in 2004 on charges of conspiracy, obstruction of justice and making false statements in an insider-trading probe.

James Comey, whom Trump fired as FBI director last year and has repeatedly assailed, was the lead federal prosecutor in Stewart’s case and played a role in the prosecution of Lewis “Scooter” Libby, the chief of staff to former Vice President Dick Cheney. Trump pardoned Libby in April.

Trump also said he might commute the 14-year prison sentence of former Illinois Governor Rod Blagojevich, a Democrat convicted of corruption charges, and was considering pardoning a woman convicted of a drug-related charge after reality TV star Kim Kardashian discussed the case with him on Wednesday.

White House spokesman Hogan Gidley, briefing reporters on Air Force One as Trump later flew to Dallas for Republican fundraising events, denied that celebrity was a consideration in whom the president decides to pardon.

“Look, there are plenty of people the president is looking at right now under the pardon process,” he said.

The U.S. Constitution gives the president the power to issue pardons, and Trump sometimes has used that authority to benefit convicted figures revered by some on the political right such as former Arizona sheriff Joe Arpaio and Libby.

After D’Souza’s pardon, some constitutional scholars, legal analysts and Democratic lawmakers accused Trump of undermining the rule of law with pardons based on political considerations.

Slideshow ( 3 images )

‘SENDING A MESSAGE’

Critics said the president was sending a message to people caught up in Special Counsel Robert Mueller’s investigation into whether Trump’s 2016 presidential campaign colluded with Russia, including his longtime private lawyer Michael Cohen, whose business dealings are separately under scrutiny in New York.

“Trump’s Dinesh D’Souza pardon today, on top of his pardons of Scooter Libby and Joe Arpaio, make sense only as an elephant-whistle to Michael Cohen & all who know damning things about Trump: protect me & I’ll have your back. Turn on me & your goose is cooked. More obstruction!” Harvard Law School constitutional law professor Laurence Tribe wrote on Twitter.

“As with the pardon of Joe Arpaio, Trump is sending a message that he will reward political allies for loyalty with get-out-of-jail-free cards,” Democratic U.S. Representative Don Beyer said on Twitter. “He doesn’t care about the rule of law.”

Trump denies any collusion with Russia and has called Mueller’s probe a “witch hunt.”

D’Souza, 53, admitted in 2014 he illegally reimbursed two “straw donors” who donated $10,000 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 1980s.

He was sentenced to five years of probation after telling the judge he was ashamed of his actions and contrite. “I cannot believe how stupid I was, how careless, and how irresponsible,” D’Souza wrote in a statement to the judge.

Some conservatives complained of selective prosecution of D’Souza. The prosecutor, Manhattan U.S. Attorney Preet Bharara, was an Obama appointee later fired by Trump.

Slideshow ( 3 images )

On Thursday, D’Souza thanked Trump in Twitter posts that also slammed Bharara. “KARMA IS A BITCH DEPT: @PreetBharara wanted to destroy a fellow Indian American to advance his career. Then he got fired & I got pardoned,” D’Souza wrote.

Bharara earlier said on Twitter: “The President has the right to pardon but the facts are these: D’Souza intentionally broke the law, voluntarily pled guilty, apologized for his conduct & the judge found no unfairness. The career prosecutors and agents did their job.”

Stewart and Blagojevich both were involved with Trump’s “Apprentice” reality TV television show.

Blagojevich was convicted of corruption offenses including soliciting bribes for appointment to the U.S. Senate seat Obama vacated after being elected president in 2008.

Last August, Trump pardoned Arpaio less than a month after his conviction for criminal contempt in a case involving racial profiling of Hispanics. Arpaio was known for his crackdown on illegal immigrants in Arizona’s Maricopa County.

Libby was convicted in 2007 of lying in an investigation into the unmasking of a CIA agent.

Trump last week posthumously pardoned boxer Jack Johnson, the first black world heavyweight champion, who was jailed a century ago because of his relationship with a white woman.