NEW DELHI (Reuters) - India tested its longest-range intercontinental missile on Thursday, the defense ministry said, part of efforts to build a nuclear deterrent against neighboring Pakistan and China.

The 5,000-km range (3,107-mile) Agni missile was tested from an island in India’s eastern coast in the Bay of Bengal, the ministry said on its official Twitter account.

It said the launch was “a major boost to the defense capabilities” of India.

The Agni-V is an advanced version of the indigenously built Agni, or Fire, series, part of a program that started in the 1980s. It has been tested previously before.

New Delhi says it faces a twin threat from both bitter foe Pakistan, which is developing a nuclear and missile program of its own, as well as China. A long-running dispute over the Himalayan border with China has flared in recent years.