WASHINGTON — In granting the fifth pardon of his presidency Thursday, President Trump showed that he's not afraid of political consequences of using his clemency power to correct what he perceives as unjust, politically motivated prosecutions.

On an Air Force One flight to Houston, Trump pardoned conservative commentator Dinesh D'Souza for making illegal campaign contributions — and then said he is also considering presidential clemency for others, including former Illinois governor Rod Blagojevich and lifestyle guru Martha Stewart.

The White House characterized each of those cases as righting a wrong and correcting an injustice. "That's a power outlined by the Constitution, one in which he understands the gravity," said deputy press secretary Hogan Gidley.

But Trump's renewed pardon talk also comes amid federal investigations into his own campaign and inner circle — including an inquiry into whether his personal attorney, Michael Cohen, violated the law when he illegally paid off a porn star who said she had a relationship with Trump.

"The president’s ad hoc use of the pardon power is concerning enough," said Sen. Mark Warner, D-Va., vice chairman of the Senate Intelligence Committee. "But the possibility that he may also be sending a message to witnesses in a criminal investigation into his campaign is extremely dangerous."

Trump's use of the pardon power to help political allies is hardly unprecedented. But previous presidents have quietly granted their most controversial pardons in their last months — and even last hours — in office. Trump has done so early in his presidency, and in an extraordinarily public way.

Trump announced the D'Souza pardon on Twitter Thursday as he headed to Texas on Air Force One. In flight, he spoke to reporters for 34 minutes, ending with an ad-libbed discussion of possible pardons.

He told reporters that Blagojevich's attempt to sell Barack Obama's former Senate seat after Obama became president was "a stupid thing to say" but not worth 18 years in prison. Blagojevich, a Democrat, appeared on Trump's reality television show Celebrity Apprentice in 2010.

Trump said a pardon of Stewart also crossed his mind. Stewart, the head of a publishing and television empire who hosted a spinoff of The Apprentice, was convicted of obstructing justice in an investigation into insider trading in 2004.

"I think to a certain extent, Martha Stewart was harshly and unfairly treated. And she used to be my biggest fan in the world — before I became a politician," Trump said. "But that’s OK. I don’t view it that way."

Trump said he called D'Souza, who is serving five years' probation for making illegal campaign contributions, to give him the news Wednesday night. "I’ve always felt he was very unfairly treated. And a lot of people did," he said. "What they did to him was horrible.”

He accused Bharara of destroying him to advance his career. "Then he got fired & I got pardoned," he tweeted. "Obama & his stooges tried to extinguish my American dream & destroy my faith in America."

Trump said no one asked him to pardon D'Souza, but D'Souza himself credited a social media campaign and the intervention of Sen. Ted Cruz, R-Texas — a family friend — in bringing the case to Trump's attention.

"I'm sorry for what I did. I have never said otherwise," he said then. "I have never even said I am being selectively prosecuted. I feared that I was being."

Dinesh D'Souza.(Photo: Alberto E. Rodriguez, Getty Images)

D'Souza pleaded guilty of making "straw donations" in the names of others to support the candidacy of Republican New York Senate candidate Wendy Long, who lost to Sen. Kirsten Gillibrand in 2012. Those straw donations allowed him to give $20,000 in illegal contributions to the campaign, exceeding the $5,000 legal limit.

Those facts provide a parallel to the federal investigation into Trump's attorney, who may also face federal charges of exceeding campaign contribution limits and failing to disclose a $130,000 payoff to Stormy Daniels, a porn star who claims she had an extramarital relationship with Trump in 2006.

Rick Hasen, a University of California-Irvine law professor who specializes in election law, said the pardon sends "yet another signal to Michael Cohen and others about the possibility of a Trump pardon."

Sixteen months into his presidency, Trump has pardoned more people than any president since George H.W. Bush in 1989.

Trump also pardoned Kristian Saucier, a former Navy submariner whose conviction for mishandling classified information became a conservative cause because of its comparisons to Democratic Secretary of State Hillary Clinton's use of a private email server.

Like all of those cases, D'Souza did not apply for a pardon with the Office of the Pardon Attorney, the Justice Department unit that conducts investigations of pardon cases and sends recommendations to the president. Under Justice Department rules, D'Souza would be ineligible through that process because he's on probation.

Likewise, neither Blagojevich nor Stewart has applied for clemency.

The president's constitutional authority to pardon is not bound by those rules, so Trump has granted politically charged pardons though he denied 180 applications from people who applied through the Justice Department.

"The pardon power itself is incredibly broad, but what informs the use of that power is where the critical question is," said Andrew Wright, a Savannah Law School professor who handled pardon cases in the White House counsel's office under Obama.

"He views it as an extension of his situational politics," he said. "The coin of the realm in the Trump administration is flattery and aggressive defense of him on cable television, and if you’re willing to do that, you will get a different set of laws applicable to you."

D'Souza, 57, is an Indian-born author and documentary filmmaker whose work has assailed Obama, Islam and multiculturalism. His most recent book is The Big Lie: Exposing the Nazi Roots of the American Left.

Other works includes the book The Roots of Obama's Rage and the film 2016: Obama's America, both of which argue that Obama's politics were formed by the anti-colonial ideology of his Kenyan-born, estranged father.

Though he was spared prison time in the campaign-finance case, D'Souza's conviction put him under court supervision. He was required to undergo weekly counseling sessions and complete an eight-hour day of community service during every week of his five-year probation. That community service: teaching English to Spanish-speaking immigrants at Catholic parishes.

He had to receive permission from a judge to leave the country in January for a research project to Nuremberg, Germany, where Nazis were put on trial for war crimes after World War II.

White House spokeswoman Sarah Sanders said Trump determined D'Souza was "fully worthy of this pardon."

"Mr. D’Souza was, in the president’s opinion, a victim of selective prosecution for violations of campaign-finance laws," she said. "Mr. D’Souza accepted responsibility for his actions and also completed community service by teaching English to citizens and immigrants seeking citizenship."