A court has ordered Richard Simmons to pay nearly $130,000 in attorneys’ fees following a failed defamation lawsuit against the National Enquirer and Radar Online.

More than six months ago, a judge dismissed Simmons’ case against the media outlets, which published articles alleging that the former fitness guru had undergone gender reassignment surgery.

Now the reclusive celebrity has to cover the lawyer costs of the outlets and their publisher, American Media, according to court documents.

Los Angeles Superior Court Judge Gregory Keosian issued his ruling on Friday, NBC News reported. In January, the defendants had filed a motion seeking $220,000, which Simmons’ lawyers had described as a “billing fiesta.”

RELATED: Judge To Dismiss Richard Simmons’ Defamation Lawsuit Against Tabloid — Because Calling Someone Transgender Isn’t Defamatory

The case came about after Simmons sued the publications for claiming that he is transgender. The cover headline for the June 2016 issue of the National Enquirer read: “Richard Simmons: He’s Now A Woman.”

Simmons, who retreated from the public eye in 2014, said that the stories were published with “calculated malice” and contained false information provided by a former assistant.

“This case is about a particularly egregious and hurtful campaign of defamations and privacy invasions, falsely asserting that Mr. Simmons is transitioning from a male to a female, including ‘shocking sex surgery,’ breast implants, hormone treatments and consultations on medical castrations,” Simmons’ lawsuit stated.

However, Judge Keosian ruled that being called transgender does not automatically make that person the target of “hatred, contempt, ridicule or obloquy,” and, thereby, does not fit the legal definition of defamation.

Simmons intends to appeal the dismissal motion.