Barack Obama arrived in Afghanistan today for an unannounced visit fresh from his first major domestic success on healthcare reform.

In his first visit to the country since becoming president, Obama was expected to meet the embattled Afghan president, Hamid Karzai as well as other local and US officials, and give a speech to US troops.

Before the trip, a White House official said Obama wanted to get an "on the ground update" about the war from General Stanley McChrystal, the US and Nato commander, as well as Karl Eikenberry, the US ambassador.

Obama, who described Afghanistan as a war of necessity in contrast to Iraq, ordered an extra 30,000 US troops for to be sent in December and set a mid-2011 target for a withdrawal. The decision came after months of painstaking deliberation that left the US president open to accusations of dithering.

Obama travelled to Afghanistan during the 2008 US presidential election but has not been back since his victory over John McCain, whose criticism at the time prompted the trip. The White House official said weather and logistics had thwarted previous attempts at a presidential visit.

Public opinion in the US has turned against the war as it has in the UK. The number of US troops killed in Afghanistan has roughly doubled in the first three months of 2010 compared with the same period last year. US officials have warned that casualties are likely to rise even further as the Pentagon completes its deployment of the 30,000 additional troops and as Nato forces prepare an offensive against the Taliban's home base in Kandahar province.

"We must steel ourselves, no matter how successful we are on any given day, for harder days yet to come," Admiral Mike Mullen, chairman of the joint chiefs of staff, said at a briefing last month.

Fifty-seven US soldiers were killed during the first two months of 2010 compared with 28 in same period last year, according to Pentagon figures compiled by The Associated Press. At least 20 US service members have been killed so far in March, compared with 13 a year ago.

Britain, which has the second largest contingent, has lost at least 33 troops since 1 January, compared with 15 for the same period last year. A British soldier was killed on Friday, bringing the total of British deaths since the war began in 2001 to 277.

Obama faced serious domestic opposition over his December decision to increase troop levels in Afghanistan, with only about half the US public supporting the move. But support for his handling of the war has actually improved since then, despite the increased casualties.

The latest Associated Press-GfK poll at the beginning of March found that 57% of those surveyed approved his handling of the war in Afghanistan compared with 49% two months earlier. Michael O'Hanlon, a foreign policy expert at the Brookings Institution, said the poll results could partly be a reaction to last month's offensive against the Taliban stronghold of Marjah in Helmand province.

US officials have said they plan to use many of the additional forces to reassert control in Kandahar province, where the Taliban have made big gains over the past few years in an effort to boost their influence over Kandahar city, the largest city in the south and the Taliban's former capital.

Many analysts believe the Kandahar operation will be much more difficult than the recent Marjah offensive because of the greater dispersion of Taliban forces, the urban environment in Kandahar city and the complex political and tribal forces at work in the province.

The goal of both operations is to put enough pressure on the Taliban to force them to the negotiating table to work out a political settlement.