A federal judge ordered President Trump's golf course in Jupiter, Florida, to pay former members $5.7 million.

The ruling is the result of a class action lawsuit that was brought against Trump National Golf Club and its partners in 2013.

About 65 members claimed that when Trump took over the course, the terms of their membership changed and they lost access to the club. The suit alleged that Trump refused to refund over $5 million in dues and was in breach of contract.

The members said they were entitled to refunds of their membership deposits which ranged from $35,000 to $210,000. They also wanted back their annual dues.

The judge awarded the former members their deposits plus interest.

Neither lawyers nor spokespersons for President Trump or the Trump organization could be reached for comment.

U.S. District Court Judge Kenneth Marra issued his decision on Wednesday after hearing the case in August during a two-day non-jury trial.

Related: Trump's fight to slash the taxes on his $50 million golf course

The members claimed they had "refundable" membership status under the former ownership.

Private clubs that offer a refundable membership category allow members to pay dues until a new club member joins and can take over the payments. Essentially these existing members are placed on a "resigned" list until their membership is transferred to someone new.

The plaintiffs claimed that when Trump bought the club in 2012, he changed the rules and terminated their "resigned" or "refundable" status.

"As the owner of the club, I do not want them to utilize the club nor do I want their dues," Trump wrote to the club's members in December 2013, after buying the club. "In other words, we are committed to seeing Trump National Golf Club - Jupiter on the list of the best clubs in the world and if you choose to remain on the resignation list, you're out."

Related: Donald Trump settles Trump University lawsuits

The Jupiter golf club suit is the latest controversy surrounding Trump and his chain of Trump National Golf Clubs in the U.S. as well as his international courses.

Trump is currently suing the town of Ossining, N.Y., in an effort to try to lower the taxes on his golf course there. The town said the course is worth $15.1 million. Trump said it's worth only $1.5 million.

In June, the PGA Tour moved an event from Trump's course in Miami to a new venue in Mexico. The Tour had been unable to raise the necessary sponsorship funds.

Trump International Golf Links outside Aberdeen, Scotland opened in 2012 and has met with lots of resistance from locals. In December 2015, Trump lost in his attempt to stop the Scottish government from creating a wind farm near the course.

In July 2015, the PGA pulled one of its golf tournaments from a Trump-owned course near Los Angeles. ESPN also relocated its ESPY Celebrity Golf Classic from that course. That same month, a Trump-branded course in Puerto Rico filed for bankruptcy.