As the United States forges closer ties to India, neighboring Pakistan is looking for some new friends. Officials hope they have found one in Russia — a budding partnership that could eventually shift historic alliances in South Asia.

In recent months, Pakistani military and political leaders have reached out to Moscow, seeking to warm ties that have been frosty since the Cold War. In November, Russian Defense Minister Sergei Shoigu visited Islamabad and signed a military cooperation agreement with Pakistani generals. Pakistan is now hoping to finalize plans to buy three dozen Russian Mi-35 helicopters and more closely coordinate efforts to counter terrorism and narcotics. Pakistan also wants Russian assistance to stabilize chronic energy shortages.

The moves come as Pakistani leaders grow increasingly nervous that their traditional alliances could erode, if not crumble, in the coming years. For much of its history, Pakistan has been an ally of the United States, while Russia had stronger ties to India, even backing it during that country’s 1971 war with Pakistan. But now that most NATO troops have left next-door Afghanistan — and the Pakistani army is straining to overcome Islamist militants on its western border — officials here fear that the United States’ regional interest is tilting toward India, Pakistan’s eastern neighbor and archrival.

“Of course we are concerned,” said one senior Pakistani military leader, who spoke on condition of anonymity. “The balance of power is being tipped toward India, and that is not good, and it’s been done with the help of the Western World. That is why we are looking at various markets, because conventional [military] parity is the only recipe for peace and stability.”

Pakistan’s efforts to kindle ties with Moscow come as relations between the West and Russia continue to worsen, which may prompt it to look for new trading partners in Asia. Pakistanis are also worried the Indian army is moving toward dominance in the conventional arms race.

Those concerns were magnified this week, when President Obama met in New Delhi with Indian Prime Minister Narendra Modi. Obama and Modi vowed to strengthen cooperation on defense and energy matters, and they announced a deal that they said should smooth the way for American companies to invest in Indian civilian nuclear plants.

Since Pakistan was partitioned from India in 1947, the two nuclear-armed countries have fought three major wars. So when Obama was the guest of honor at an elaborate military parade in New Delhi this week, it was viewed with skepticism on this side of the border.

“To be very honest, we think Obama has gone one step too far,” said Maria Sultan, chairwoman of the Islamabad-based South Asian Strategic Stability Institute, an organization with close links to Pakistani military and intelligence.

In another sign of the unease, Pakistan’s powerful army chief, Raheel Sharif, traveled to China last weekend to solidify long-standing military and economic ties between the two countries. China is Pakistan’s largest arms supplier, having sold or transferred it nearly $4 billion in weapons since 2006, according to the Stockholm International Peace Research Institute (SIPRI), which monitors arms sales.

The United States, with about $2.5 billion in arms sales to Pakistan over the past nine years, is the country’s second-largest arms supplier. In December, Congress also authorized $1 billion in additional funds to Pakistan for its continued support of counter-terrorism operations. But it is unclear how much American aid will flow to Pakistan in the coming years.

Tasnim Aslam, spokeswoman for Pakistan’s Ministry of Foreign Affairs, said Pakistan doesn’t want to “put all of its eggs in one basket.”

“It’s a multi-polar world, and its in our interest to engage all the poles and forge relationships,” said Aslam, who earlier this month led a high-level Pakistani delegation to Moscow to discuss future ties.

Noting Secretary of State John F. Kerry had a productive visit to Islamabad two weeks ago, Aslam said Washington shouldn’t read too much into Pakistan’s outreach to Putin. But some Pakistani lawmakers offered a more pointed view of Pakistan’s rapprochement with Russia.

“Pakistan’s historical mistake after its inception was to establish close ties with the United States but to ignore the Russians,” said Haji Muhammad Adeel, a lawmaker who chairs the Pakistani Senate’s foreign relations committee. “We went to war with Russia in Afghanistan, and that brought us gifts of terrorism, extremism and drugs. Now Pakistan is trying to forge friendly ties with Russia to correct the mistakes of past.”

Despite that outreach, it remains unclear whether Pakistan’s efforts to bolster ties with Russia will pay off.

Russian diplomats in Islamabad declined to comment on the two countries’ relations. But Russia is India’s largest arms supplier, with $18 billion in sales since 2006, according to SIPRI.

Yury Barmin, a Russian foreign policy expert based in the United Arab Emirates, said he doubts Russia would risk its relationship with India by also selling arms to Pakistan. He said he suspects Putin, who visited New Delhi in December, is using Pakistan as leverage over the Indian government so it doesn’t get too close to the United States.

“It’s the way Russian diplomacy works,” Barmin said. “They find a pressure point, but then they go to India and release the pressure and say, ‘Hey, we are not developing that relationship anymore.’ ”

But Rifaat Hussain, an Islamabad-based defense expert, said the West should not underestimate the potential for a realignment of strategic ties in Asia.

“There is now a visible strain with Moscow’s relationship with the United States, and Moscow has moved much closer to China, which I think facilitates Pakistan’s relationship with Russia,” Hussain said.

Shaiq Hussain contributed to this report.