ABOARD AIR FORCE ONE (AP) _ Three hours from landing on a high-risk visit to Baghdad, President Bush was most anxious about keeping it a secret.

``I was fully prepared to turn this baby around, come home,'' Bush said later aboard Air Force One. To everyone's amazement the secrecy held.

The world did not learn that Bush had spent 2 1/2 hours Thursday on a Thanksgiving Day visit to troops in Baghdad until his jumbo jet was again in the air, flying back to the United States, where he arrived early Friday, making it back to his ranch in Texas shortly before daybreak.

As the president was cheering up soldiers in a mess hall in Baghdad, 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, L. Paul 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 a mess hall where 600 soldiers were waiting impatiently for Thanksgiving dinner.

Bremer 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 electrified the crowd.

``I was just looking for a warm meal somewhere,'' he joked to the cheering crowd.

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.

Interviewed on NBC's ``Today'' show Friday, she said security was ``very, very tight'' and said that ``almost no one knew because operational security was absolutely critical.''

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.