Mr. Trump’s company had argued that the wind turbines would mar the view from the golf course. The case went to the Supreme Court of the United Kingdom in December 2015, where the company lost, setting up the ruling about who should pay costs.

The exact sum of the reimbursement that the Trump Organization now has to pay has not been disclosed. The White House did not immediately respond to a request for comment.

The president’s tweet prompted bafflement and concern among some legal and ethics experts.

Thomas Lundmark, a professor of law at the University of Hull, in northern England, said in a telephone interview on Monday that the tweet “made me curious.”

“I don’t know what he’s talking about,” Mr. Lundmark added. “Does it further a relationship for him? For the United States? For us? How?”



Though the ruling in Scotland was against Mr. Trump’s company, Mr. Lundmark suggested that there were constitutional and ethical concerns.