By JILL COLVIN, Associated Press

PALM BEACH, Fla. (AP) — 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 for an undisclosed period of time if his administration determines Mexico has lost "control" on its side.

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."

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.

But Trump continued to warn about the situation on the southern border as he took questions from reporters, pointing to the caravans of Central American migrants that have been making their way toward the U.S. and warning that, "If we find that it gets to a level where we lose control or people are going to start getting hurt, we're going to close entry into the country for a period of time until we get it under control."

He said he had the authority to do so by executive order and claimed he'd already used it earlier this week. "Two days ago, we closed the border. We actually just closed it, said nobody's coming in because it was just out of control."

By no means did he seal the border with Mexico. Officials did shut down one port of entry, San Ysidro, in California, for several hours early Monday morning to bolster security because of concerns about a potential influx of migrant caravan members. They closed northbound lanes into the U.S. and reopened most of them before the morning rush.

Trump's border threat came days after a federal judge put the administration's attempts to overhaul asylum rules on hold. Courts have also blocked several versions of the president's travel ban as well as his attempt to end a program that allows young immigrants brought to the country illegally as children to live and work in the country.

Trump probably could close the entire southern border by order, at least temporarily, invoking national security powers. But doing so could cause extraordinary damage to bilateral relations as well as to cross-border commerce between the U.S. and Mexico, its third largest trading partner. It would not necessarily stop migrants from coming either; Trump would have to contend with the same asylum laws already vexing his efforts to harden the border.

Among other subjects the president touched on in his question-and-answer session with the press:

—Trump disputed reports the CIA has concluded that Saudi Arabia's crown prince was responsible for journalist Jamal Khashoggi's killing. "The CIA points it both ways," said Trump. "Maybe he did, maybe he didn't."

—Asked who should be held responsible for killing, Trump responded that, "Maybe the world should be held accountable 'cause the world is a vicious place."

—Trump said he'd be interviewing candidates for potential openings in his administration — but wouldn't say for what positions.

"I'm very happy with my Cabinet and the people working for me and for us. ... They're absolute stars." But, he said, "there's always a lot of change. I'll probably be changing a couple."

—Trump would not discount the possibility of a partial government shutdown over lawmakers' refusal to allocate billions of dollars for his promised border wall. "Could there be a shutdown? There certainly could, and it will be about border security, of which the wall is a part," Trump said

—Trump said he'd spoken with his daughter Ivanka following news she'd sent hundreds of emails from a private address while serving as a senior White House adviser. Trump said she was "very innocent" and that situation was very different from the one he's said his 2016 rival Hillary Clinton should be in jail for.

—He defended his acting attorney general, Matthew Whitaker, calling him "a highly respected person" whom the press had treated nastily.

—He complained about the military's use of new electromagnetic catapult technology instead of steam in the new Navy aircraft carriers, telling a Navy officer that, "unfortunately, you have to be Albert Einstein to really work it properly." The officer rebuffed him. "You sort of have to be Albert Einstein to run the nuclear power plants that we have here as well. But we're doing that very well," he said, advising the president to "go electromagnetic."

Trump later traveled to a nearby Coast Guard station, where he delivered a lunch of plastic-wrapped sandwiches, fruit and chips before spending some time at one of his golf courses.

He and his family capped the day with several hundred dues-paying members and their guests at a Thanksgiving feast in Mar-a-Lago's opulent ballroom that included the usual fixings, along with chilled seafood, Chilean sea bass and braised short ribs.

___

Associated Press writer Colleen Long in Washington contributed to this report.

___

Follow Colvin on Twitter at https://twitter.com/colvinj