US president-elect Donald Trump
Islamabad - Islamabad and Washington have seen relations sour over US accusations that Pakistan shelters militants.
They hit new lows in May when a US drone killed the leader of the Afghan Taleban movement on Pakistani territory.
At the same time, Pakistan's ties with traditional rival India have also deteriorated this year, with India saying Pakistan-based militants killed 19 of its soldiers in a September attack on an army base in Kashmir.
To many Pakistanis, Trump's anti-Muslim rhetoric - he once proposed banning Muslims entering the United States - and business ties to India are signs that his administration could shift further toward New Delhi.
On Wednesday, a US diplomat in Pakistan sought to assure the country that Trump's election did not signal a drastic policy change.
"Our foreign policy is based on national interest and they don't change when the government changes," Grace Shelton, U.S. Consul General in Karachi, told Geo News television.
Pakistani Prime Minister Nawaz Sharif congratulated Trump.
"Your election is indeed the triumph of the American people and their enduring faith in the ideals of democracy, freedom, human rights and free enterprise," Sharif said in a statement.
Still, the uncertainty of a Trump presidency has many Pakistanis on edge, even if the country has leaned towards China in recent years for investment and diplomatic support.
"Trump is a bit of a wild card," said Sherry Rehman, a Pakistani senator and former ambassador to the United States.
"Pakistan obviously cannot rule out engaging with whomever America elects, but his anti-Muslim rhetoric may cast a shadow on relations in times of uncertainty."
INDIA HOPEFUL
Indian Prime Minister Narendra Modi also congratulated Trump on Wednesday.
"We look forward to working with you closely to take India-US bilateral ties to a new height," Modi said in a tweet.
Trump has partnered with Indian businessmen on a handful of real estate ventures, but apart from courting the Indian-American vote he has not articulated how he would develop the bilateral relationship.
India-US ties have flourished under President Barack Obama and Modi, who came to power in 2014, with the two countries striking key defence agreements this year.
Modi's government has also waged a campaign to isolate Pakistan diplomatically.
Shaurya Doval, director of the India Foundation, a think-tank close to Modi's government, called Trump's election "a very positive development", but added that India and the United States would have continued to grow closer under a Hillary Clinton presidency as well.
"My sense is that India-US relations are not dependent on individuals - there are strong institutions and processes there," he said.
One fringe Hindu nationalist group in India held a victory gathering at New Delhi's speakers' corner on Wednesday.
"He's an American nationalist. We are Indian nationalists. Only he can understand us," Rashmi Gupta of the Hindu Sena, or Hindu Army, told Reuters. "We expect him to support us when it comes to terrorist attacks on India from Pakistan."
AFGHANISTAN WAR
Trump will also have to decide whether to maintain the number of US troops in Afghanistan or change the scope of the mission, 15 years after a US-led campaign toppled the hardline Taleban government.
The United States has spent some $115 billion in aid for Afghanistan since 2002, but the country is still caught in conflict, with a third of the country out of government control and thousands of Afghan civilians, soldiers and police dying every year.
Afghan officials have voiced concern that the conflict is being forgotten in Washington, and warned privately that the West will pay a huge price if that continues.
"The people of Afghanistan are tired of war. We want (Trump) to invest heavily in bringing peace to war-torn Afghanistan and stabilize our region," said Umer Daudzai, former Afghan minister of interior.
Obama's original aim of pulling out of Afghanistan entirely has been put on hold in the face of mounting gains by Taleban militants, with US air power and special forces still regularly involved in combat.
As recently as last week, two US Green Berets were killed near the northern city of Kunduz.
Although Afghan security forces have been fighting largely alone since the end of the main NATO-led combat mission in 2014, their performance has been patchy and they continue to rely heavily on US air power.
The Taleban on Wednesday urged Trump to withdraw all US troops.
"They should not cause damage to their economy and their military in this failed war," Taleban spokesman Zabihullah Mujahid said of the American government in a statement.