Image copyright Getty Images

US President Donald Trump has commuted the prison sentence of Rod Blagojevich, the former Illinois governor convicted of trying to sell Barack Obama's vacated US Senate seat.

But why would the Republican president, who once promised to drain the swamp, show mercy to a Democrat viewed by critics as the embodiment of dirty politics?

Even the president's fellow party members in Illinois criticised his decision.

The state's House Republican delegation said in a statement: "Blagojevich is the face of public corruption in Illinois and not once has he shown any remorse."

But Trump was having none of it. "That was a tremendously powerful, ridiculous sentence," he told reporters on Tuesday.

Speaking to reporters after his release, Blagojevich described his "long, unhappy journey" as a "political prisoner" and thanked the president on behalf of his family.

Who else did Trump show mercy to?

Blagojevich wasn't the only beneficiary of presidential mercy on Tuesday. Trump went on a clemency spree, including to three high-profile figures with powerful friends:

Bernie Kerik, a former New York police commissioner, pleaded guilty to tax fraud and other charges and was sentenced to prison in 2010. His celebrity supporters include Christopher Ruddy, the head of Newsmax Media, and the president's personal attorney, Rudy Giuliani

Michael Milken, a financier who rose to prominence in the 1980s, was convicted of securities fraud. Celebrity supporter: Fox host Maria Bartiromo

Edward DeBartolo Jr, the former owner of the San Francisco 49ers, pleaded guilty in 1998 to offences related to a gambling scandal. Celebrity supporters: Ohio Pastor Darrell Scott and former NFL player Jerry Rice

Even before he won the White House, Trump expressed sympathy for Blagojevich, who was convicted of flagrant corruption.

In 2008, he was responsible for naming someone to fill the Senate seat of Obama, who had been elected president.

Image copyright NYEIN CHAN NAING Image caption Representative Jan Schakowsky, a Democrat, asked a judge to release Blagojevich early

Blagojevich, who was twice elected governor, spoke about the political opportunity on the phone with another state official, describing his plans to sell or trade the Democratic safe seat.

"I've got this thing," Blagojevich said, describing the seat as "golden".

The governor - who loved the camera and was known for always having a hairbrush handy - said: "I'm just not giving it up… for nothing."

Blagojevich, 63, also tried to obtain campaign funds in exchange for legislation that would help the race-track industry.

He attempted to pressure an executive at a children's hospital into contributing money to his campaigns.

Blagojevich was convicted of soliciting bribes, attempted extortion and wire fraud, and was sentenced to 14 years. His release date was projected for 2024 until Trump stepped in.

Image copyright Getty Images

Before he was put behind bars in 2012, Blagojevich had appeared on Trump's Celebrity Apprentice TV show.

After he was convicted in a retrial a year earlier, Trump told the Hollywood Reporter he felt bad for him.

The president's support for Blagojevich offers a case study in his approach to presidential power and the justice system.

Trump has his own grievances about investigations - he has called Special Counsel Robert Mueller's Russian inquiry a "witch hunt".

On Trump's favourite news channel Fox News last year, Blagojevich's wife, Patti, depicted her husband as the victim of over-zealous prosecutors, drawing parallels with the president's experience during the Mueller investigation.

Mueller was FBI director when her husband was arrested, and former FBI Director James Comey - another Trump foe - is friends with a former US attorney, Patrick Fitzgerald, who prosecuted Blagojevich.

Patti Blagojevich laid out these connections in interviews.

The prosecution team behind the Blagojevich case said on Tuesday that despite the president lawfully exercising his clemency powers, the former governor "remains a felon, convicted of multiple serious acts of corruption".

Ruth Ben-Ghiat, a historian and cultural critic at New York University, says: "He [Trump] clearly identifies with this man who has a harsh sentence and is a fighter.

"He likes that kind of swagger."

She says the president's public views of Blagojevich "helps to create this culture in politics where loyalty is valued over ethics, and where corruption is not necessarily a negative thing".

Others point out that Trump has never condoned Blagojevich's crimes, but has focused instead on the perceived harshness of the sentence.

Brennan Hart, a political consultant in Alexandria, Virginia, who worked on Trump's 2016 presidential campaign, says the president "likes people who are a little bit over the top - like a caricature of a manly man".

Image copyright Joe Amon Image caption Rod Blagojevich, shown in 2012, was released from prison early

"He's not saying it's OK," says Hart, referring to the president's attitude towards Blagojevich's offences. "He's saying, it's been long enough."

Presidential clemency has been a politically fraught issue for decades. President Bill Clinton pardoned a former business partner, Susan McDougal, who went to jail because she refused to testify in the Whitewater real-estate scandal.

President George HW Bush pardoned key figures in the Iran-contra scandal, in which he himself was implicated.

But Trump's critics say he has gone further in the way he has politicised clemency.

David Litt, a former Obama speechwriter and the author of a memoir, Thanks, Obama, says Trump's clemency for Blagojevich reveals "his own victimhood narrative".

He says it will "send a message to other people who might be considering a variety of corrupt practises: if you get caught, he'll have your back".