PALM BEACH, Fla. — President Donald Trump used a Thanksgiving Day call to troops deployed overseas to pat himself on the back and air grievances about the courts, trade and migrants heading to the U.S.-Mexico border.

Trump's call, made from his opulent private Mar-a-Lago club, struck an unusually political tone as he spoke with members of all five branches of the military to wish them happy holidays.

"It's a disgrace," Trump said of judges who have blocked his attempts to overhaul U.S. immigration law, as he linked his efforts to secure the border with military missions overseas.

Trump later threatened to close the U.S. border with Mexico.

The call was a uniquely Trump blend of boasting, peppered questions and off-the-cuff observations as his comments veered from venting about slights to praising troops — "You really are our heroes," he said — as club waiters worked to set Thanksgiving dinner tables on the outdoor terrace behind him. And it was yet another show of how Trump has dramatically transformed the presidency, erasing the traditional divisions between domestic policy and military matters and efforts to keep the troops clear of politics.

"You probably see over the news what's happening on our southern border," Trump told one Air Force brigadier general stationed at Bagram Airfield in Afghanistan, adding: "I don't have to even ask you. I know what you want to do, you want to make sure that you know who we're letting in."

Trump also continued to rail against the 9th U.S. Circuit Court of Appeals, which he said has become "a big thorn in our side."

"It's a terrible thing," he said, when judges "tell you how to protect your border. It's a disgrace."

Later, Trump asked a U.S. Coast Guard commander about trade, which he noted was "a very big subject" for him personally.

"We've been taken advantage of for many, many years by bad trade deals," Trump told the commander, who sheepishly replied that, "We don't see any issues in terms of trade right now."

And throughout, Trump was sure to congratulate himself, telling the officers that the country is doing exceptionally well on his watch.

"I hope that you'll take solace in knowing that all of the American families you hold so close to your heart are all doing well," he said. "The nation's doing well economically, better than anybody in the world." He later told reporters "nobody's done more for the military than me."

Indeed, asked what he was thankful for this Thanksgiving, Trump cited his "great family," as well as himself.

"I made a tremendous difference in this country," he said. "This country is so much stronger now than it was when I took office and you wouldn't believe it and when you see it, we've gotten so much stronger people don't even believe it."

Trump threatened to close the U.S. border with Mexico for an undisclosed period of time if his administration determines that its southern ally has lost "control" on its side. Trump cited the situation involving migrants camped in Tijuana after traveling in a caravan to reach the United States.

Trump said he's given American troops at the border the "OK" to use lethal force against migrants "if they have to."

"I hope they don't have to," he told reporters, but added, "I have no choice" because "you're dealing with rough people."