A Manhattan judge has barred the New York Sports Club and Lucille Roberts gyms from charging certain members dues after the New York Attorney General sued the companies over the charges.

AG Letitia James sued the two companies' parent company, Town Sports International, after hundreds of complaints were filed to her office alleging the gyms were illegally charging monthly dues despite members' attempts to cancel memberships or when their home gym location remained closed due to pandemic restrictions.

On Friday, Manhattan judge issued a temporary restraining order on the company to keep it from charging certain members until at a hearing on the lawsuit is held. The order could be extended.

"This order stops New York Sports Club and Lucille Roberts dead in their tracks and halts these health clubs from continuing to unlawfully charge many of their members," James said in a statement.

The companies are barred from charging customers who submitted a membership cancellation request after March 16th or whose primary gym location remains closed.

A hearing is scheduled for October 29th, court records show. Town Sports International did not immediately respond to a request for comment.

The company filed for bankruptcy last month as the COVID-19 pandemic has devastated various businesses. The New York Sports Club got a $32 million bankruptcy loan in the meantime to float the cost of operations and a sale process, according to Reuters.

"As so many continue to struggle financially as a result of COVID-19, we will continue to do everything in our power to protect New Yorkers’ wallets from a company that seeks to lift up its dire financial state at the expense of members," James added.