Michael Avenatti paid back Stormy Daniels money he allegedly stole from her by borrowing $250,000 from one of Hollywood's top celebrity lawyers.
The disgraced attorney's trial heard Wednesday that Avenatti was so broke at the time he couldn't make rent payments on his office and 'teared up and cried' when somebody else turned him down for a loan.
He was eventually bailed out in September 2018 by celebrity attorney Mark Geragos, whose clients have included Michael Jackson, Chris Brown and Winona Ryder.
Geragos agreed to the loan to help out 'El Presidente', a joke referring to Avenatti's mooted run for the presidency at the time, the trial heard.
Avenatti then used the funds to pay Daniels $148,000 that he owed her for a payment for her 2018 memoir, Full Disclosure.
Michael Avenatti leaves Manhattan Federal Court after his third day of trial where a court heard he borrowed $250,000 from a lawyer to pay back former client Stormy Daniels
The disgraced attorney is defending himself against wire fraud and aggravated identity theft charges filed by prosecutors who claim he cheated Daniels of nearly $300,000 she was owed from a book deal
Avenatti is pictured left with Stormy Daniels in May 2018, before their professional relationship collapsed after she accused him of embezzling money she made of her 2018 memoir Full Disclosure (right)
Avenatti, who represented Daniels in her lawsuit against former President Donald Trump, is accused of illegally syphoning off $300,000 of an $800,000 payment for her memoir to himself.
He allegedly forged her signature to persuade her agent to pay the money to him rather than to her as he had previously done.
Avenatti denies wire fraud and aggravated identity theft and is facing up to 22 years in prison if found guilty.
He was sentenced to 30 months in prison last year after being convicted of trying to extort up to $25million from sportswear giant Nike.
He has not yet begun serving the sentence.
The once high-powered attorney is also awaiting retrial in a California case - on charges that he cheated clients of millions of dollars - after a mistrial last year.
Court documents filed in the Nike case showed that Geragos, who was involved in negotiations with Avenatti and the sportswear company, tried to warn Avenatti that he 'crossed a line'.
Geragos 'was concerned about and uncomfortable with the situation…which Geragos believed may have become extortionate', a prosecution filing stated.
Avenatti's trial heard Wednesday that he was ultimately bailed out in September 2018 by celebrity attorney Mark Geragos (pictured) whose clients have included Michael Jackson, Chris Brown (right) and Winona Ryder
Sean Macias, a California lawyer and former friend of Avenatti, gave evidence on the third day of the trial Wednesday, claiming Avenatti asked to borrow $250,000 but he refused
A text message presented as evidence in court showed Macias had thanked Geragos 'for sorting out Avanatti' on September 5, 2018
Sean Macias, a California lawyer and former friend of Avenatti, gave evidence on the third day of the trial at the federal court in New York.
In early 2018 he introduced Avenatti to Daniels, a porn actress who became shot to infamy after claiming she had a sexual encounter with Donald Trump who allegedly paid her to stay quiet.
Macias said that over the Labor Day weekend in 2018 he and Avenatti were in Las Vegas at a boozy 'blow out party' following a legal conference when his friend seemed 'agitated' and 'a little bit needy'.
As Macias, a colorful, barrel-chested figure, told the court, Avenatti came over and 'slumped' in his chair and said that Daniels was going 'crazy'.
Macias said Avenatti told him she was going to 'blow up' the deal with the publishers and go to the press because she wasn't getting paid the second installment for her book deal.
Prosecutors claim that Daniels had in fact been paid, only Avenatti forged her signature to get her agent to give him the money instead of her.
Macias told the jury that the following Tuesday he was 'shocked' to find Avenatti turn up in the conference room of his law firm unannounced while he was out to lunch.
Evidence presented in court showed Macias reluctantly reached out to a wealthy tech friend to help Avenatti but the man later emailed to say that the 'transaction cannot happen on such a short time frame'
The defense alleged Avenatti (pictured in a Monday courtroom sketch) had given Daniels hundreds of thousands of dollars only to be faced with false accusations from her, adding that behavior was not uncommon for Daniels, who when she didn't 'get her way, she turned on the people closest to her'
Avenatti claimed he was 'jammed' for money and that he was going to be evicted from his office in Los Angeles and couldn't make his payroll.
Macias said that he was stunned because Avenatti was the 'top lawyer' in the state at the time given how he and Daniels were taking legal action against Trump.
Macias claimed that Avenatti asked him for a loan of $250,000 but he said no, remarking that he 'used the F word with a no at the end'.
Avenatti begged Macias: 'You've gotta help me out, you've gotta help me out', the court heard.
Macias reluctantly called a wealthy tech friend of his and they set up a meeting that evening where Avenatti talked about how he was 'fighting the good fight' and taking on Trump.
Avenatti upped his request to $300,000 and Chennai escort service the man seemed to be keen to help.
But the next day the friend emailed Macias to say that 'this transaction cannot happen on such a short time frame'.
According to Macias, Avenatti was 'really upset'.
He said: 'He teared up crying'.
Avenatti begged Macias to call Geragos, which he reluctantly did and was met with a surprisingly warm reception.
Geragos 'kind of laughed' as Macias explained that Avenatti was 'jammed' and 'being squeezed' by the landlord of his office.
Daniels claims she had a one-night stand with Trump in 2006 - on the night this photo was taken - a year after he married third wife Melania.
Trump denies the claim
According to Macias, Geragos referred to Avenatti as 'El Presidente' and said: 'Why not?'
The money appears to have arrived in Avenatti's account that day, September 5, 2018.
According to the indictment, that day Avenatti paid Daniels the $148,750 he got from her literary agent a month prior that she should have already had received.
Prosecutors claim that Avenatti failed to pay her the third payment for an identical sum which was sent weeks later after he requested that it be hurried up.
During cross examination Avenatti, who is representing himself, asked Macias if the money he was trying to arrange for him was actually for his Presidential campaign.
Macias said: 'Absolutely not'.
Avenatti is accused of misappropriating funds intended for Daniels in part by forging her signature in a letter to an agent.
He is pictured with Daniels in 2018 outside federal court in New York
Avenatti claimed that Macias was 'enthusiastic' about the prospect of him running for the White House.
Macias didn't deny it and said that while Avenatti wanted him to be his chief of staff he wanted him to 'make me ambassador of France, that would be awesome'.
Daniels, whose real name is Stephane Cliffod, is expected to testify on Thursday and Judge Jesse Furman denied Avenatti's request to be able to question her about back payment of taxes and child support payments to her former spouse.
DailyMail.com has reached out to Geragos for comment.