A prominent Philadelphia lawyer lost his lawsuit against Amazon and Roc Nation over an alleged illegal recording of comments he made about his client, who just so happens to be the judge at the center of rapper Meek Mill’s probation violation case.

On Wednesday, U.S. District Judge Gerald McHugh dismissed attorney A. Charles Peruto Jr.’s actions against producers of a forthcoming documentary series titled #FreeMeek, alleging they violated the Pennsylvania and Federal Wiretap Acts. Peruto was also seeking the return of the audio files, but the federal judge shot him down, The Hollywood Reporter reports.

The case stems from the #FreeMeek project, which chronicles the hip-hop star’s rise to fame and his 10-year battle with the Philadelphia justice system. Peruto represented Judge Genece Brinkley, who infamously sent Meek Mill to prison on multiple occasions for probation violations. For that reason, the filmmakers interviewed Peruto in May 2018, during which he made statements about the issue that he believed were off the record and not being recorded.

“That was hard to do because defending this judge is now becoming – why doesn’t she just grant this f*cking thing?,” he allegedly states. The camera had been turned off but the audio was still recording, and Peruto reportedly never makes clear to the interviewers that what he’s about to say is off the record.

READ MORE: Prince Harry celebrate his first official Father’s Day

In his ruling, Judge McHugh notes how Peruto thanks the defendants and gestures to remove his mic. He then says, “Let me tell you something,” and the camera turns off. The audio, however, continues to record, according to McHugh, and that’s when the attorney makes the colorful statement about his client.

The audio was eventually leaked to The Philadelphia Inquirer.

READ MORE: OJ Simpson joins Twitter and says he has a ‘little gettin’ even to do

Peruto sued Amazon, Roc Nation and others in September over claims that they recorded him without his knowledge. He argued that he made an off-the-record disclaimer before making the statement about Genece but that it was edited out. Judge McHugh wasn’t buying it, and dismissed the case at the summary judgment phase last week.

“Mr. Peruto spoke freely in front of a room full of individuals, some of whom he did not know, in the presence of recording equipment,” McHugh said. “Peruto knew the recording devices had just been recording, yet he began disparaging his client before he even had time to fully remove his microphone.”

As for Peruto’s allegation that the defendants violated the Pennsylvania and Federal Wiretap Acts, the judge wrote that both laws require a speaker to have “a reasonable expectation of privacy” during an oral communication in order to support accusations of violations.