Taliban militants asked US president-elect Donald Trump to pull all US forces from Afghanistan after Trump won the "hard-fought" US election on Wednesday.

“Avoid further disgrace in a failed war,” Taliban spokesman Zabihullah Mujahid said in a statement on Wednesday.

Mujahid asked Trump to “let other nations enjoy freedom,” and stop bringing further harm to American soldiers and economy.

Nearly 10,000 US troops are stationed in Afghanistan assisting Afghan security forces under the Train, Advice, and Assist (TAA) mission.

Congratulating Trump on his win, Afghan President Ashraf Ghani said his government hopes that "in close cooperation with the new president of the United States, relations between the two countries expand further and develop in a way that is in the interest of the two countries and nations."

Abdullah Abdullah, the Afghan chief executive also congratulated Trump saying “Afghanistan is looking forward to the expansion of mutual cooperation with the new US administration under Donald Trump."

Afghan analysts think US policies in Afghanistan will continue regardless of who takes the seat in the White House, and in addition they favour Trump’s position on terrorism and Pakistan.

Trump "will fight terrorism and countries that harbor it," Bashir Ahmad Bizhan, an Afghan political analyst told dpa referring to Pakistan.