Tight lips and meticulous planning enabled President Bush (search) to risk a trip to Baghdad amid continuing attacks on American troops. In fact, the president was willing to order Air Force One to turn around at the last minute if word one about his secret, danger-fraught mission was leaked to the press.

"I was fully prepared to turn this baby around, come home," Bush said later on Thursday aboard Air Force One (search). To the amazement of everyone involved, the plan was a success.

The press, much less his own parents, did not learn that Bush had broken bread with troops in Baghdad during a two-hour visit until he was in the air and well on his way back to the United States, where he landed on Friday. But it seemed all the secrecy paid off, in the form of a welcome holiday morale boost to the troops.

In a mess hall where 600 soldiers were waiting impatiently for Thanksgiving dinner, L. Paul Bremer (search) told the soldiers it was time to read a Thanksgiving message from the president, a task reserved for the most senior official present.

"Is there anybody back there more senior than us?" Bremer said, standing alongside Lt. Gen. Ricardo Sanchez, commander of coalition forces in Iraq.

With that, Bush stepped from behind the stage and sent the cheering crowd to its feet.

"I was just looking for a warm meal somewhere," he joked, fighting back tears at the enthusiastic reception.

While the president was speaking with and serving food to the soldiers, newscasters back home were reporting that he was enjoying Thanksgiving dinner with his family at his ranch in Crawford, Texas. That was what reporters had been told by White House officials.

Bush said he thought Americans would be understanding about the deception because it was important for soldiers at risk to know that the commander in chief and the country supported them and appreciated their sacrifices.

He told reporters that Americans understand that if the trip had been announced "it would have put me in harm's way. It would have put others in harm's way, including yourselves."

The bold nature of the trip, with television networks broadcasting the news on a day when most Americans were at home with families watching football or parades, could give Bush a PR boost at a time of steadily increasing casualties among U.S. troops and polling that shows postwar Iraq becoming more of a liability for the president.

Behind the trip were weeks of top-secret planning, doubts and last minute questions. It began in mid-October when chief of staff Andy Card asked Bush whether he would be interested in going to Baghdad for the holiday.

"Yes, I would," Bush replied. "Except I don't want to go if it puts anyone in harm's way. I said it's very essential I understand all aspects of the trip, starting with whether or not we could get in and out safely."

If word leaked out of the trip, Air Force One could become a prized target for terrorists and Saddam Hussein loyalists.

Bush said he was "the biggest skeptic of all" about whether the trip could be pulled off. He questioned military commanders and the civilian administrator in Iraq, Bremer, and even sat down with the pilot of Air Force One, Col. Mark Tillman, to go over details.

Three hours from Baghdad, Bush still was concerned about secrecy.

He questioned his secret service agents and they checked with officials on the ground. No leaks. Bush said he had been prepared to pull the plug if the secret were out.

Air Force One, with its lights off and window shades pulled down, landed in darkness. Bush's motorcade from the plane sped across the unlit tarmac at Baghdad airport to the unsuspecting troops. 

Addressing troops from the 1st Armored Division and the 82nd Airborne, and other units, Bush said he brought a message from home: "We thank you for your service. We're proud of you and America stands solidly behind you."

Bush said the terrorists and insurgents were testing America's resolve and "they hope we will run" from Iraq.

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

The remarks brought the soldiers to their feet.

"It was a pleasant surprise," said Master Sgt. Michael Johnson of Turlock, Calif. "They had us waiting so long I started to get (mad). But it's not so often you get to meet a president."

Bush served mashed potatoes for 10 minutes and then ducked into a meeting with national security adviser Condoleezza Rice, who had accompanied him to Baghdad, along with Bremer, Sanchez and four members of the Iraqi Governing Council.

Five reporters, five photographers and a camera crew and producer, sworn to secrecy, accompanied the president on the trip. Bush surreptitiously left his ranch in an unmarked car with tinted windows, riding with Rice and secret service agents.

Other Secret Service agents left at the ranch were not told the president had departed. Rice and the president wore ball caps; Bush said he pulled his low on his face and slouched down in his seat to avoid being recognized by an airfield guard.

"We looked like a normal couple," Bush said of himself and Rice.

Air Force One landed at Andrews Air Force Base just outside Washington and was pulled into a huge hanger. Out of view, Bush then boarded an identical jumbo jet, used alternately with the other aircraft as Air Force One.

Reporters who joined the trip at Andrews had their cell phones, pagers and other electronic devices taken away by security officials until the plane was headed toward Iraq.

The Associated Press contributed to this report.