Turkey with the commander in chief was a surprise Thanksgiving treat for American troops in Baghdad.

President Bush (search) flew in under the cover of darkness on Thursday to dine with U.S. forces at a Baghdad International Airport mess hall. It was the first trip ever by an American president to Iraq — a mission tense with concern about his safety.

Bush's surprise trip delighted troops and stunned the nation -- including the president's own parents, who had traveled to Crawford, Texas (search), expecting to spend the holiday with their son. Media outlets were reporting on Thursday morning that Bush would be at his ranch all day, only to be told the truth after the fact, when he was safely in the air and headed back home.

The president returned to U.S. soil early Friday, as his plane landed at Andrews Air Force base outside Washington shortly after midnight, before continuing on to Texas to complete the dramatic journey.

Great pains were taken not only to ensure the president's safety in turbulent Iraq but to deliver a special Thanksgiving morale boost to American troops.

With the president out of sight, L. Paul Bremer (search), the chief U.S. civilian administrator, told the soldiers it was time to read the president's Thanksgiving proclamation and that it was a task for the most senior official present.

"Is there anybody back there more senior than us?" he asked. That was the cue for Bush, who promptly stepped forward from behind a curtain, setting off pandemonium among the troops.

"I was just looking for a warm meal somewhere," Bush joked to some 600 soldiers from the 1st Armored Division and the 82nd Airborne Division, who were stunned by the appearance and applauded wildly while giving Bush a standing ovation.

"Thanks for inviting me. I can't think of finer folks to have Thanksgiving dinner with than you all."

"We thank you for your service, we're proud of you, and America stands solidly behind you," Bush said. And he urged the people of Iraq to "seize the moment and rebuild your great country based on human dignity and freedom."

"He's got to win in '04. No one else can prosecute this war like he can," said Army Capt. John Morrison from Butler County, Pa. Said PFC1 Kyle Crittenden of Humboldt County, Calif.: "I'm proud to serve in his Army."

Bush reaffirmed for soldiers that their efforts are making a difference.

"You are defeating the terrorists here in Iraq," he said, "so we don't have to face them in our own country."

Terrorists are testing America's resolve, Bush said, and "they hope we will run."

"We did not charge hundreds of miles into the heart of Iraq, pay a bitter cost of casualties, defeat a ruthless dictator and liberate 25 million people only to retreat before a band of thugs and assassins," the president said, prompting a standing ovation and cheers.

He also had a message for the people of Iraq: "The regime of Saddam Hussein is gone forever," he said, and pledged the help of the United States and its coalition partners, saying "we will stay until the job is done. I'm confident we will succeed."

Wearing an exercise jacket with a 1st Armored Division patch, Bush stood in a chow line and dished out sweet potatoes and corn for Thanksgiving dinner and posed with a platter of fresh-baked turkey.

Army Lt. Col. John Hinkley, from the 3rd Brigade 1st Armored Division serving in Baghdad, was not at the dinner with the president but was nevertheless touched by the visit: "It's a great morale boost," he told Fox News.

"It demonstrates that the president, as the commander in chief, is willing to go wherever he's sending his soldiers in harms way."

During his 2 ½ hours on the ground, Bush also met with four members of the Iraqi Governing Council (search), Baghdad's mayor and city council, and with top U.S. commanders.

Bush flew in on the plane he most often uses, and White House officials went to extraordinary lengths to keep the trip a secret, fearing its disclosure would prompt terrorist attempts to kill him.

The president's plane — its lights darkened and windows closed to minimize chances of making it a target — landed under a crescent moon at Baghdad International Airport.

The news of Bush's trip was not released until he was in the air on the way back to the United States. "If this breaks while we're in the air we're turning around," White House communications director Dan Bartlett told reporters on the flight to Baghdad.

Plans for the trip were tightly held among a handful of senior aides.

In a ruse staged in the name of security, the White House had put out word that Bush would be spending Thanksgiving at his ranch in Crawford, Texas, with his wife, Laura, his parents and other family members. Even the dinner menu was announced.

Bush's parents, former President George H.W. Bush and Barbara Bush, were invited to his ranch for the holiday but were not informed.

Later, back aboard Air Force One for the flight home to Crawford, the president told reporters that he made his decision while thinking about how hard it must be for soldiers to spend the holiday far from home and family.

"It's got to be a lonely moment for them," Bush said. "I thought it was important to send that message that we care for them (the troops) and we support them strongly, that we erase any doubts in their minds as to whether or not the people stand with them. ... Having seen the reaction of those troops, you know it was the right thing to do."

The timing of the trip was by its very nature assured to give Bush maximum PR exposure, coming on a day when most Americans were relaxing at home, many watching football games, when the announcement came. Some networks interrupted programming with news of the journey.

Security fears were heightened by an attack last Saturday in which a missile struck a DHL cargo plane, forcing it to make an emergency landing at the airport with its wing aflame.

Bush spent only about two hours on the ground, limiting his visit to the airport dinner with U.S. forces. The troops had been told that the VIP guests would be Bremer and Lt. Gen. Ricardo Sanchez (search), commander of coalition forces in Iraq.

Instead, Bush slipped away from his home without notice Wednesday evening with national security adviser Condoleezza Rice, both of them disguised with baseball caps. Bush told reporters that they looked like a "normal couple." Bush then flew to Washington to pick up aides and a handful of reporters sworn to secrecy.

Bush first began discussing a visit to Iraq for Thanksgiving five or six weeks ago, Bartlett said. After ordering the planning to proceed during his trip to Asia last month, Bush made the final decision to go on Wednesday, after a secure video conference call from his ranch with Vice President Dick Cheney, chief of staff Andrew Card and Rice.

White House officials went to extraordinary lengths to keep the trip a secret, fearing its disclosure would prompt terrorist attempts to kill him.

Security fears were underscored by regular attacks against U.S. forces in Iraq. More than five dozen U.S. troops were killed by hostile fire in November, more than any other month since the end of major combat in Iraq on May 1. Early this week, a U.S. military official, Col. William Darley, said attacks peaked at more than 40 per day about two weeks ago and have since dropped to about 30 per day.

The violence persisted Thursday as the president was en route. Insurgents fired a rocket-propelled grenade at the Italian mission in Baghdad, damaging the building but causing no injuries, the U.S. military said.

Also, a U.S. military convoy came under attack on the main highway west of Baghdad near the town of Abu Ghraib (search), witnesses said. And in the northern city of Mosul, unidentified gunmen shot dead an Iraqi police sergeant, said Brig. Gen. Muwaffaq Mohammed.

Since operations began, nearly 300 U.S. service members have died of hostile action, including 183 since May 1 when Bush declared an end to major fighting.

When Bush's father visited U.S. troops at a desert outpost in Saudi Arabia on Thanksgiving Day 1990, in the run up to the first Gulf War, he became the first U.S. president to visit a front-line area since President Nixon went to Vietnam in 1969.

Dwight David Eisenhower, as president-elect, visited Korean battlefronts in December 1952 and President Lyndon Johnson made two wartime trips to Vietnam.

Fox News' Jim Angle and The Associated Press contributed to this report.