A federal judge in Florida on Wednesday directed a golf club owned by President Donald Trump to pay $5.77 million to former members who claimed it wrongfully refused to refund their deposits after Trump took over in 2012.

U.S. District Judge Kenneth Marra in West Palm Beach said Trump National Golf Club Jupiter must repay $4.849 million plus $925,010 of interest to 65 former members for breach of contract, following a non-jury trial last August.

Marra said the club had no right to keep the deposits after locking out members who had declared their plans to resign prior to Trump’s purchase in November 2012.

Before Trump took over, the club had permitted members who wanted to resign to keep playing golf until their replacements were found.

But Trump changed the rules, declaring in a letter that “as the owner of the club” he did not want such members to use the club, and telling them “you’re out.”

Marra, however, said this deprived the plaintiffs of their “continuing right” to use the club until new members joined.

“By categorically denying class members all rights to club access because they remained on the resignation waiting list as of Dec. 31, 2012, defendant revoked or canceled their memberships,” and should have refunded their deposits, he said.

The Trump Organization said in a statement that it disagreed with the decision, and it will appeal.

“At the time Trump purchased the club, it was suffering financially, making it unlikely that these members would ever get back their deposits,” it added.

Brad Edwards, a lawyer for the plaintiffs, said in an interview that “our clients are thrilled that they are getting exactly what they deserve.”

He added: “I think President Trump is going to respect this judgment.”

In a footnote, Marra noted that Trump was a “private citizen” at all times relevant to the lawsuit, and that he would refer to Trump as such in the decision.

“In doing so, the court means no disrespect to him or to the esteemed position he now holds,” Marra, an appointee of former President George W. Bush, wrote.