He has been called the shadow White House chief of staff, but Sean Hannity also sought to assist Paul Manafort as he defended himself from the special counsel’s investigation, according to court documents unsealed on Friday.

Mr Hannity, a Fox News host who is a close ally of Donald Trump, advised Manafort on how to fight his prosecution in the court of public opinion and also pressed for confidential details about the case, according to a compilation of hundreds of text messages exchanged between the men, made public as part of the winding down of the case.

Mr Hannity at times appeared to try to gauge whether Manafort, a former Trump campaign aide, might be poised to cooperate with investigators and, if so, what he might tell them about Mr Trump and his inner circle.

After Manafort’s former deputy, Rick Gates, pleaded guilty last year and agreed to cooperate with investigators, Mr Hannity asked why Manafort did not “get a sweetheart deal like Gates.” Manafort responded that prosecutors “would want me to give up” the president or his family, especially his son-in-law and White House adviser, Jared Kushner. “I would never do that.”

The messages underscore the outsize role Mr Hannity has played in Mr Trump’s orbit.

Criminals who worked for Trump Show all 5 1 /5 Criminals who worked for Trump Criminals who worked for Trump Michael Cohen Former lawyer for Donald Trump was sentenced to three years in prison on counts involving evading income tax, false disclosure of the hush money paid to Stormy Daniels and another hush money charge Getty Criminals who worked for Trump Paul Manafort Former campaign manager for Trump Manafort was found guilty in February 2018 of five counts of tax fraud, two counts of bank fraud and one count of failure to disclose a foreign bank account. The crimes occurred prior to his appointment in Trump's campaign Getty Criminals who worked for Trump George Papadopoulos Former Trump campaign adviser Papadopoulos pleaded guilty to lying to the FBI in October 2017. He had lied about making contact with a professor who claimed that the Russians had dirt on Hillary Clinton. He was sentenced to 14 days in jail Getty Criminals who worked for Trump Michael Flynn Former White House National Security adviser Michael Flynn pleaded guilty to lying to the FBI in December 2017. He had lied about conversations that he had with the Russian ambassador to the US during Trump's Presidential campaign. He was not given prison time due to his "significant assistance" to the Mueller investigation Getty Criminals who worked for Trump Rick Gates Deputy chairman of Trump's presidential campaign Gates pleaded guilty to lying to the FBI in February 2018 AFP/Getty

On his daily syndicated radio programme and nightly Fox News show, he serves as a top supporter, leading the charge against Mr Trump’s enemies. But Mr Hannity also speaks regularly to the president about strategy and messaging, and the messages suggest he sought to play a similar role for Manafort, raising the spectre that he may have helped the two parties coordinate their strategies or at least given him real-time visibility into both sides’ thinking.

Days before Manafort and Gates were indicted in October 2017, Mr Hannity suggested he had information. Manafort responded within 10 minutes, and the subsequent messages suggest they spoke on the phone, after which Manafort thanked Mr Hannity for “the news,” adding, “You are the best!”

A few months later, Manafort arranged for Mr Hannity to speak with his lawyer Kevin Downing, then quickly followed up, asking how the call went. “Good,” Mr Hannity said. “I asked him to feed me everyday,” adding, “He has to SEND ME STUFF.”

“He will,” Manafort responded.

“Every day,” Mr Hannity demanded.

Later, they speculated on the fate of Mr Kushner, with Manafort positing that the special counsel, Robert Mueller, might be targeting the president’s son-in-law as a way of pressuring Mr Trump into an interview.

“He won’t agree,” Mr Hannity said. “The lawyers will fight tooth and nail. Proffered agreement. All pre-planned.”

In a statement responding to the release of the text messages, Mr Hannity said, “My view of the special counsel investigation and the treatment of Paul Manafort were made clear every day to anyone who listens to my radio show or watches my TV show.”

Neither Mr Downing nor a spokesperson for Manafort responded to a request for comment.

The messages began in July 2017 as prosecutors ramped up their investigations into Manafort and Gates, but months before the men were indicted on charges related to their unregistered lobbying work for Russia-aligned Ukrainian interests.

The messages ended in June 2018, the day after Manafort was charged with additional counts on witness tampering. Two months later, he was found guilty on tax and banking violations. He subsequently pleaded guilty to additional charges and was sentenced in March to 7 1/2 years in prison.

Mr Hannity and Manafort seemed to have developed a bond, sharing misplaced confidence that Manafort would beat the charges against him, as well as a disdain for Mr Mueller and his investigators. In one text, Manafort compared Mr Mueller to the Gestapo.

Former Trump campaign chairman Paul Manafort pleads guilty

Both men expressed raw animosity for Andrew Weissmann, a member of the special counsel’s team who helped lead the prosecution of Manafort. He called Mr Weissmann a “slime ball,” “unethical” and “illegal” while Mr Hannity concurred with the dismal view of Mr Weissmann.

They thought little of former attorney general Jeff Sessions, expressing disappointment that he did not appoint a second special counsel to investigate the Clinton Foundation.

“Sessions is totally worthless,” Manafort wrote in April 2018. Mr Hannity responded, “Worthless.”

Mr Hannity, who has repeatedly attacked the special counsel and the investigation into the president, regularly exchanged messages with Manafort about Fox News segments defending him and assailing his critics.

After an episode in October 2017, Manafort messaged to compliment Mr Hannity and to complain about the lack of attention towards a dossier of research, which included claims about Manafort, that had been compiled for Democrats by a former British spy.

“It’s really important that this doesn’t fade,” Manafort wrote. “Congress must engage.”

Mr Hannity responded, “I mentioned that!! Congress is finally engaging.”

Later, Manafort, who professed to be a regular viewer, wrote to Mr Hannity: “In a fair world you would get a Pulitzer for your incredible reporting.” After another broadcast, Manafort told the Fox host that he loves him.

At one point early in their correspondence, Mr Hannity indicated he would do “anything I can” to aid Manafort, adding, “I’m NOT a fair weather friend.”

But there was a limit to their relationship. Mr Hannity deflected on multiple occasions when Manafort asked for help drawing attention to efforts to raise money for his legal defence, initially suggesting he might allow Manafort to highlight the fund if he appeared on Mr Hannity’s show.

Manafort repeatedly begged off, citing his gag order. He made a final urgent appeal to Mr Hannity for fundraising assistance in May 2018, writing: “Do you think you can do a tweet or a like to the site? I need to draw traffic to it quickly.”

Mr Hannity responded, “Paul it may be problematic with Fox. I need to get the ok. Hope u understand.”