President Donald Trump on Friday commuted the prison sentence of his longtime ally Roger Stone, shielding the veteran Republican operative from 40 months behind bars.

"Roger Stone is now a free man!" the White House said in a statement, days before he was to report to a federal prison to start serving his term.

Trump's action immediately brought new charges that the president intervenes freely in the U.S. justice system to help friends and allies and punish critics and perceived enemies.

Stone, one of Trump's oldest confidants, was convicted last November of lying to Congress, tampering with a witness and obstructing the House investigation into whether the Trump campaign conspired with Russia to help him win the 2016 election.

The fiery White House statement reiterated Trump's charge that Special Counsel Robert Mueller investigated an alleged crime that was never committed. It argued that Stone should therefore never have been charged in the first place.

"The simple fact is that if the Special Counsel had not been pursuing an absolutely baseless investigation, Mr Stone would not be facing time in prison," it said.

In a statement to US media, Stone's lawyer Grant Smith said his client was "incredibly honored that President Trump used his awesome and unique power under the Constitution of the United States for this act of mercy."

The Trump administration had already intervened once to help Stone. After prosecutors recommended a prison term of seven to nine years, Attorney General Bill Barr, who has been accused of acting like Trump's personal lawyer, stepped in and called that excessive.

All four prosecutors handling the case quit it and a newly appointed prosecutor recommended a prison term of three to four years for Stone.

Stone was the sixth aide of Trump -- who was impeached last year for abusing his power -- to be convicted of charges arising from Mueller's probe into Russian election interference.

Roger Stone leaves the federal courthouse in Washington, DC after a sentencing hearing on February 20, 2020
Roger Stone leaves the federal courthouse in Washington, DC after a sentencing hearing on February 20, 2020 AFP / Brendan Smialowski

Critics responded quickly and angrily after Trump commuted Stone's sentence.

Representative Adam Schiff, the Democrat who led the impeachment drive against Trump, put it bluntly: "With Trump there are now two systems of justice in America: One for Trump's criminal friends and one for everyone else."

Top Senate Democrat Chuck Schumer slammed "a lawless president who regards the Justice Department as his personal plaything" while others blamed Republicans' tolerance of Trump's behavior in leading to what they called a breakdown in the justice system and rule of law.

Barr has been berated for his department's decision to drop the case against Trump's first national security advisor, Michael Flynn, who pleaded guilty in 2017 to lying about his Russia contacts to the FBI.

Last month the administration forced out Geoffrey Berman, a New York prosecutor known for probing allies of Trump.

The Trump administration has in recent months also fired or demoted inspectors general for the Pentagon, the intelligence community and the Department of Health and Human Services, as well as a senior health official who questioned Trump's promotion of unproven drug therapies for COVID-19.

State Department inspector general Steve Linick was removed last month after running a misconduct probe into Washington's top diplomat and steadfast Trump ally Mike Pompeo.

More than 1,000 former Justice Department officials signed a statement calling for Barr's resignation over his interference to get a lighter sentence for Stone.