President Trump showed up in Afghanistan on Thursday for a surprise Thanksgiving visit with troops engaged in America's longest-ever military conflict. Mr. Trump arrived at Bagram Air Field shortly after 8:30 p.m. local time and spent more than two-and-a-half hours on the ground, speaking to troops and meeting with Afghanistan's president.

Reporters were under strict instructions to keep the trip a secret to ensure his safety. Mr. Trump's public schedule said he would be at Mar-a-Lago to host a videoconference call with troops. It's his first trip to the country as president. While in Afghanistan, Mr. Trump said he hopes to bring the number of troops in Afghanistan down to 8,600 from the current 14,000.

President Trump takes a photo with U.S. troops during a surprise visit at Bagram Air Field in Afghanistan, on Thursday, November 28, 2019. Tom Brenner / Reuters

In a meeting with Afghanistan President Ashraf Ghani, the president confirmed to reporters talks have restarted with the Taliban.

Get Breaking News Delivered to Your Inbox

"The Taliban wants to make a deal, and we're meeting with them and we're saying it has to be a ceasefire, and they didn't want to do a ceasefire, and now they do want to do a ceasefire. I believe it'll probably work out that way," Mr. Trump said.

During his whirlwind trip, the president served turkey to troops. Military personnel told reporters on the ground there were roughly 500 troops in the rooms where the president went.

"There's nowhere I'd rather celebrate this Thanksgiving than right here with the toughest, strongest, best and bravest warriors on the face of the earth - you are indeed that," the president told the troops.

The president was greeted with cheers when he mentioned the death of ISIS leader Abu Bakr al-Baghdadi.

"Our message to the bloodthirsty terrorists is clear, you will not escape your wretched fate because the long reach of the really awesome power of the United States military is unstoppable," Mr. Trump said. "We have the most powerful military in the world by far. There's nobody close. And we're going to keep it that way. We're going to keep it that way. This evening, as millions of families sit down at their dinner tables back home, they'll say a prayer for the men and women serving in our nation in Afghanistan and deployed all around the globe. Great men and women all around the globe."

Last year, just after Christmas, Mr. Trump made his first-ever visit to a combat zone as commander-in-chief when he and first lady Melania touched down in Iraq to pay a surprise visit to U.S. troops based there.

The president's visit to Afghanistan came just more than a week after a helicopter crash in the country brought the number of U.S. deaths in Afghanistan this year to 19. This year has already been the deadliest for the U.S. military since the troop surge of 2014. More than 2,400 Americans have died in the nearly 18-year war.

Mr. Trump delivers remarks to U.S. troops during an unannounced visit to Bagram Air Field, Afghanistan, on Thursday, November 28, 2019. Tom Brenner / Reuters

Mr. Trump received a warm welcome from U.S. troops, even as his administration has presided over strained relations with Afghanistan's government. Mr. Trump has made a concerted effort to wind down U.S. involvement in what he calls "endless wars" in Afghanistan and the Middle East.

As CBS News correspondent Charlie D'Agata reported in September, the Taliban have justified their intensified campaign of violence this year as a sort of "hurry up offense" - a power and territory grab aimed at gaining leverage in peace talks with the U.S., which President Trump declared "dead" a couple months ago.

Mr. Trump eats dinner with U.S. troops at a Thanksgiving dinner event during a surprise visit at Bagram Air Field. Tom Brenner / Reuters

The talks were aimed at striking a political deal with the Taliban that would have allowed for the withdrawal of U.S. forces, and a handover of full security duties to the Afghan forces the Americans have spent billions of dollars training and equipping.

Afghan officials say the U.S. presence remains vital not only to their country, but to America.

General Khoshal Sadat, the highest-ranking police official in Afghanistan, told D'Agata in September that the U.S. presence was "critical, but mutually important" if the goal is to hunt down and disable terrorist organizations operating on Afghan soil.

"Al Qaeda originated from here, and we still have remnants of al Qaeda in certain pockets of the country," Sadat told CBS News. "We also see ISIS, and we have seen ISIS connections to the rest of the world."

"It will be hard (if U.S. forces leave)," he said. "We will have to make serious decisions on where we want to consolidate our efforts."

Ghani's government was deeply critical of the U.S. talks with the Taliban, saying a deal with the terrorist organization that includes a drawdown of U.S. forces would be seen "as a surrender."