US President Donald Trump's personal lawyer was forced on Monday to reveal in a New York federal court that Fox News personality Sean Hannity, one of Trump's most ardent defenders, was also on his client list.

Michael Cohen, Trump's fiercely loyal and pugnacious lawyer, disclosed Hannity's name through one of his own lawyers at the order of the judge. Stormy Daniels, an adult-film actress who claims to have had a sexual encounter with Trump, watched from the public gallery.

Daniels, in a separate civil case, is fighting a 2016 non-disclosure agreement arranged by Cohen in which she got $130,000 to stop her from discussing her claim she had sex with Trump a decade prior, something Trump has denied.

Hannity, 56, said on Monday that he had never paid for Cohen's services or been represented by him, but had sought confidential legal advice from him. The conservative host often uses his weeknight broadcast on Fox News to defend the president against what he sees as biased attacks by the media. Sometimes Trump praises Hannity in return.

Cohen was in court to ask the judge to limit the ability of federal prosecutors to review documents seized from his offices and home last week as part of a criminal investigation, which stems in part from a probe into possible collusion between Trump's presidential campaign and Russia.