Britain's Prime Minister David Cameron has made a surprise visit to Afghanistan to support the country's newly sworn-in president.

Cameron is the first of world leaders to meet President Ashraf Ghani Ahmadzai, Afghanistan's second elected president.

The two held talks in Kabul on Friday morning and were to hold a joint press conference.

Cameron, who arrived a day after visiting British pilots in Cyprus who are taking part in airstrikes on Islamic State group targets in Iraq, was also to visit British troops in Afghanistan later in the day.

Ghani Ahmadzai was sworn in on Monday, embarking on a new era for his country with a national unity government poised to confront a resilient Taliban insurgency.