Michael Avenatti has been accused of embezzling $2.5 million from a negotiated payment Miami Heat player Hassan Whiteside thought he was making to his former girlfriend, Alexis Gardner, according to prosecutors.

Avenatti was supposed to be acting as Gardner’s attorney and had negotiated a three-million dollar deal with the NBA player to settle what promised to be an embarrassing lawsuit against Whiteside, the Los Angeles Times reported.

According to records, Whiteside paid $2.75 million for a first installment of which Avenatti was supposed to receive $1 million for his fee.

But prosecutors now say that Avenatti took $2.5 million from the payment and invested it in a share of a private jet for his personal use instead of giving it to his client.

The situation was reportedly discovered in bank records subpoenaed by a Santa Ana federal grand jury.

“We entered into a mutually agreed upon settlement more than two years ago following the end of our relationship; a settlement that reflected Alexis’ investment of time and support over a number of years as Hassan pursued a career in the NBA,” Whiteside and Gardner said in a joint statement.

“It is unfortunate that something that was meant to be kept private between us is now being publicly reported. We have both moved on amicably and wish nothing but the best for each other,” the pair continued.

According to the grand jury, Avenatti told Whiteside that the whole $2.5 million was for attorney fees and that her part of the money would be broken down into 96 payments over eight years.

But following the claim of a payment plan and to cover for his misuse of the cash, Avenatti told Gardner that the NBA player was refusing to pay.

Nearly a year later, Avenatti began sending monthly payments totaling about $194,000 to Gardner claiming that the money was from Whiteside.

Follow Warner Todd Huston on Twitter @warnerthuston.