Newly-inaugurated Afghan President Ashraf Ghani has asked the country's extremist groups Taliban and Hezb-e-Islami (Islamic Party) to engage in political negotiations.

Shortly after taking oath, Ghani said the insurgent organisations should come to the negotiating table to resolve matters rather than taking up arms against the government.

"We ask opponents of the government, specially the Taliban and Hezb-e-Islami to enter political talks. Any problems that they have, they should tell us, we will find a solution," the former World Bank economist said.

The swearing-in ceremony was attended by dignitaries from 34 countries including representatives from the EU and the UN.

Ghani also urged Islamic scholars to provide guidance to the Afghan Taliban, which is engaged in an insurgency against the elected administration in the wake of Nato troops' withdrawal.

"We ask every villager to call for peace. We ask Muslim scholars to advise the Taliban, and if they don't listen to their advice, they should cut off any relations," said the new Afghan leader.

He also heaped praise on his predecessor Hamid Karzai.

In a veiled remark at the US and Pakistan, he urged foreign countries not to interfere in Afghanistan's internal political affairs.

Both his first and second vice-presidents also took oath at the inauguration at the presidential palace in the capital Kabul.

Abdullah Abdullah, Ghani's bitter political rival in the presidential election, was made the chief executive under a power-sharing deal.

Calling for unity, Abdullah said: "Today we are working as one untied team for a better Afghanistan. Afghanistan today is in need of cooperation, brotherhood, unity and partnership more than ever. Long live Afghanistan."