Donald Trump's surprise election as U.S. president has Pakistanis wary that he may accelerate what they see as a shift in American policy to favour arch-foe India in the long rivalry between nuclear-armed neighbours, analysts said on Wednesday.
Historical allies in the region, Islamabad and Washington have seen relations sour over U.S. accusations that Pakistan shelters Islamist militants, a charge Pakistan denies.
They hit new lows in May when a U.S. drone killed the leader of the Afghan Taliban 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 the disputed Kashmir region.
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.
"America will not abandon Pakistan, but definitely, Trump will be a tougher president than Hillary Clinton for Pakistan," said Hasan Askari Rizvi, Lahore-based foreign policy analyst.
"I think India will have a better and smoother interaction compared to Pakistan."
Trump has yet to lay out a detailed policy for South Asia, although he recently offered to mediate between India and Pakistan in their dispute over the divided territory of Kashmir.
He also told Fox News in May he would favour keeping nearly 10,000 U.S. troops in Afghanistan "because it's adjacent and right next to Pakistan which has nuclear weapons."
On Wednesday, a U.S. 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."
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-U.S. 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-U.S. 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."
Trump will also have to decide whether to maintain the number of U.S. troops in Afghanistan or change the scope of the mission, 15 years after a U.S.-led campaign toppled the hardline Islamist Taliban 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 Taliban militants, with U.S. air power and special forces still regularly involved in combat.
As recently as last week, two U.S. 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 U.S. air power.
The Taliban on Wednesday urged Trump to withdraw all U.S. troops.
"They should not cause damage to their economy and their military in this failed war," Taliban spokesman Zabihullah Mujahid said of the American government in a statement.