Johnny Depp asked his assistant for "happy pills", a court heard, as a lawyer for 'The Sun' claimed the actor assaulted his ex-wife after looking for Ecstasy.
News Group Newspapers is being sued by Depp over an article by Dan Wooton, its executive editor, which referred to him as a "wife beater".
The claim refers to accusations - strenuously denied by Depp - by the actress Amber Heard, who 'The Sun' lawyer said was assaulted in an alcohol and drug-fuelled incident in 2015.
Adam Wolanski, NGN's barrister, told the High Court that his client had obtained text messages between Depp and Nathan Holmes, his assistant, from Ms Heard's lawyers.
The texts referred to Depp seeking "happy pills", Mr Wolanski said, "obviously a reference to MDMA". MDMA is commonly known as Ecstasy and is available in pill or powder form.
Mr Wolanski also outlined references in the texts to "grams of coke" in the days preceding an alleged incident in Australia. One from Depp read in court asked Mr Holmes: "We should have more happy pills - can you?"
Mr Wolanski referred to the "Australia episode" of March 2015, described as "a three-day hostage situation", in which Depp is said to have "subjected Amber Heard to a three-day ordeal of physical assaults".
He said the texts show "Mr Depp asking Mr Holmes to supply him with Ecstasy pills just days before the incident".
The lawyer has claimed these messages from a US case should have been disclosed by Depp's legal team, and requested the judge throw out the libel claim on this basis.
Depp's lawyers described the move by NGN as an "ambush" and said it was "tactical, just a distraction".
Mr Wolanski said Depp's "rage was triggered by Ms Heard seeing him use drugs and challenging him about his use of drugs".
She claims she "confronted" Depp after he "took out a bag of MDMA" and said it was "not on his 'not allowed' list".
Mr Wolanski told the court that Depp said: "I did not take MDMA or any other drugs in early March 2015."
The actor has said he broke his sobriety by having a glass of vodka, and has denied the allegations against him. (© Daily Telegraph, London)