President Donald Trump has made no secret of his contempt for his own Department of Justice.
In speeches and in online missives, he accuses the FBI of leading a witch hunt, and regularly berates his chief law enforcement officer, Attorney General Jeff Sessions.
On Twitter, the president refers to the agency with quotation marks, as in: "Why didn't the crooked highest levels of the FBI or 'Justice' contact me to tell me of the phony Russia problem?"
In his first year-and-a-half in office, Trump has found another tool to hamstring the Justice Department: His pardon power.
Trump's constitutional power to unilaterally grant clemency was on display this week, as the president announced a forthcoming pardon for conservative commentator Dinesh D'Souza, as well as potential clemency for celebrity lifestyle guru Martha Stewart and disgraced former Illinois Gov. Rod Blagojevich.
With his five pardons so far, Trump has waded into a decades-long feud between the Department of Justice and at least three previous White House administrations over the process that determines how one of the presidency's most powerful tools is used.
Trump has used the pardon power to reward friends and punish foes, earning the ire of ethics watchdogs. But in the process, he has wittingly or not claimed back power for the president from the Justice Department, which has sought to expand its influence over the pardon process in recent years.
The White House and the Department of Justice did not respond to a request for comment.
"In the recent era, the last 40 years or so, you had the Justice Department pretty aggressively trying to take control of the pardon process," Samuel Morison, a former lawyer in the office of the pardon attorney, told CNBC. "I was there for 13 years, I knew exactly what was happening."
The dominance of the Justice Department in the pardon process has led to problems. An inspector general report published in 2012 found that former Pardon Attorney Ronald Rogers withheld information from President George W. Bush that may have led to a commutation. It has also led presidents, notably Bill Clinton and Barack Obama, to refrain from using their pardon power until near the end of their term.
The rate of presidential pardons has declined over the same period. According to an analysis of Justice Department data, the approval rate for pardon petitions declined from about 33 percent under Carter to less than 10 percent under both Obama and Bush.
Trump's five pardons already make him an outlier: None of his three predecessors issued any pardons in the first two calendar years of their term.
In 2010, when then-White House Counsel Gregory Craig wrote a memo seeking to modify the pardon process to make it more responsive to the president, the DOJ killed the plan, according to a 2016 article written by Margaret Love, who served as U.S. pardon attorney for seven years.
Love argues in her article that the office of the pardon attorney, which is part of the Department of Justice, should be moved to the direct supervision of the president. It's a plan that, while she was in the Justice Department, Love did not believe was viable.
Three former Justice Department officials, including Love and Morison, as well as another who asked not to be identified because the memo is not public, said they were familiar with Craig's memo, which was described as being about 40 to 50 pages long. CNBC has not obtained a copy of the memo.
Craig could not be reached by CNBC. Craig left the law firm Skadden, Arps, Slate, Meagher & Flom last month without explanation, according to Bloomberg Law. Skadden did not respond to a request for comment from CNBC.
In the modern era, the pardon process is dominated by the Department of Justice, which issues a recommendation to the president. According to Morison, that recommendation is the only information the president sees nearly 100 percent of the time.
Trump has taken a different tack in deciding who should be pardoned.
Rather than relying on the Justice Department for recommendations on who should be pardoned, Trump has chosen to pardon individuals he knows personally or has seen on television.
In his Thursday announcement that he would pardon D'Souza, the president said he knew D'Souza because of reading about him in newspapers and seeing him on television.
Both Stewart and Blagojevich are connected to the president's television show, NBC's "The Celebrity Apprentice." Blagojevich appeared on Trump's show in the spring of 2010, and Stewart hosted a spinoff, called the "The Apprentice: Martha Stewart."
In his most provocative — and first — pardon, Trump granted clemency to Joe Arpaio, the controversial former sheriff of Maricopa County, Ariz., who gained celebrity as an early Trump supporter who occasionally spoke at the president's rallies.
Other aspects beyond a tug-of-war with the Justice Department may be involved in Trump's pardoning decisions, such as personal vendettas. Take the case of Scooter Libby as an example.
In April, Trump pardoned Libby, who was convicted in 2007 of lying to the FBI while serving as Vice President Dick Cheney's chief of staff. The special counsel who prosecuted the Libby case, Patrick Fitzgerald, was appointed by none other than James Comey.
Trump fired Comey as FBI director after clashing with him amid the Russia investigation and has called him a liar and an "untruthful slimeball." On the same day that Trump pardoned Libby, he seemed to refer to Comey as well as former FBI deputy director Andrew McCabe as a "den of thieves and lowlifes."
DOJ just issued the McCabe report - which is a total disaster. He LIED! LIED! LIED! McCabe was totally controlled by Comey - McCabe is Comey!! No collusion, all made up by this den of thieves and lowlifes!
The D'Souza pardon, meanwhile, appears to be a stick in the eye for former U.S. Attorney Preet Bharara, who was fired along with 46 other attorneys appointed by President Barack Obama and has since become a public foil to the president.
And notably, Comey prosecuted Stewart while Fitzgerald oversaw the prosecution of Blagojevich.
But, whether intentionally or simply as a matter of his nature, Trump has stepped into a larger executive branch battle between those who view the pardon as a presidential prerogative, and those who would keep much of the de facto authority in the hands of a bureaucracy.
Many experts see an upside in the president gaining more authority over the pardon power. In 2014, law professors Rachel Barkow and Mark Osler argued that an independent commission should be set up outside the Justice Department that would review petitions and issue its recommendations directly to the White House.
But the potential benefits of centralizing authority are tempered by how this president in particular has chosen to use his discretion so far, experts said.
"The deeper tragedy is that he is ignoring the thousands of pending petitions that are languishing in the regular process," Osler, one of the authors of the 2014 study, told CNBC. "There are far greater injustices than Arpaio and D'Souza out there."
Morison noted that whether the president receives advice from the Justice Department, Kim Kardashian, or Sylvester Stallone, his decision to issue a pardon is perfectly constitutional. But he argued for striking a balance between receiving advice from a broad array of knowledgeable constituents, and limiting the president's discretion altogether.
"You want to have a process in place to make sure that it's not just wealthy people that get released, but on the other hand you don't want to tie the president's hands with a bureaucracy that has its own interests," Morison told CNBC.