(Adds details about trip)
By Steve Holland
BAGRAM AIR BASE, Afghanistan, May 25 (Reuters) - U.S. President Barack Obama traveled to Afghanistan on Sunday for a surprise Memorial Day weekend visit to meet with U.S. troops who are preparing to withdraw after nearly 13 years of war.
Spirited out of Washington aboard Air Force One, Obama flew for more than 13 hours for the brief visit to Bagram Air Base, the main U.S. base in the country.
The trip comes as Obama is buffeted by criticism at home that his handling of U.S. foreign policy has been too passive in dealing with crises from Syria to Ukraine and Russia.
He is to respond to the criticism in a speech on Wednesday at the U.S. Military Academy at West Point. His Afghan visit is bound to be seen by some critics as an attempt to redeem himself in the eyes of military veterans who are alarmed at allegations that government-run medical facilities in the United States have not provided timely care for veterans.
Obama, making his fourth trip to Afghanistan, was to be briefed by Army General Joseph Dunford, who heads U.S. and NATO forces in Afghanistan, and U.S. Ambassador to Afghanistan James Cunningham, as he nears a decision on how many U.S. troops to leave behind after most are gone by year's end.
During a visit scheduled to last just a few hours, Obama was also set to speak to the troops and go to the base hospital to see wounded soldiers.
Obama had no plans to visit the Afghan capital Kabul nor would he meet Afghanistan President Hamid Karzai or other government officials. This allows him to avoid getting immersed in the country's presidential election campaign to choose a successor to Karzai, who has long been out of favor in Washington.
Obama's deputy national security adviser, Ben Rhodes, said Karzai was to have been informed about the Obama visit shortly before his arrival.
Karzai has irked Obama by refusing to sign a bilateral security agreement that Washington wants before it will agree to leave a contingent of U.S. troops behind in Afghanistan for training Afghan forces and counter-terrorism operations, after the formal U.S. troop drawdown at the end of the year.
The number of U.S. troops in Afghanistan may drop well below 10,000 - the minimum demanded by the U.S. military to train Afghan forces, Obama administration officials briefed on the matter say.
There are now about 33,000 U.S. troops in Afghanistan, down from 100,000 in 2011, when troop numbers peaked a decade into a conflict in which more than 2,100 Americans have been killed.
Obama, who left Washington under cover of darkness on Saturday night and arrived at Bagram on Sunday night local time, brought with him country music star Brad Paisley to provide entertainment for the troops. The president and the West Virginia-born singer spent some time chatting on the flight. (Additional reporting by Jeff Mason; Editing by Caren Bohan and Frances Kerry)