GOA, India — India and Russia signed billions of dollars’ worth of military and energy deals on Saturday at a summit meeting that sought to inject new life into a relationship that has been tested by shifting global alliances and conflict in the Middle East.

Under the biggest agreement, a group led by the Russian state oil giant Rosneft said it would pay $12.9 billion for a controlling stake in both India’s Essar Oil and the port facilities the company owns.

In addition, the countries, which had strong ties during the Cold War, announced plans for a joint venture to build helicopters in India. New Delhi said it would also buy surface-to-air missile systems and stealth frigates from Moscow.

“Ours is a truly unique and privileged relationship,” Prime Minister Narendra Modi of India said after talks with President Vladimir Putin of Russia in the western seaside state of Goa.