Japan and India on Saturday sealed their warming ties with a deal for Tokyo to build India’s first high-speed train, defense pacts that will clear the way for Japan to sell weapons to India, and progress on a civil nuclear agreement.

The deals were announced following a meeting between Japanese Prime Minister Shinzo Abe and Prime Minister Narendra Modi in New Delhi.

The two nationalist leaders share a close rapport, and the economic and security partnership between the two countries has received a major boost since Modi came to power last year.

Abe, who is on a three-day visit to India, described the agreements as heralding a new era of cooperation between the two countries.

'Strong' India, Japan

"Strong India is for the good of Japan and strong Japan is good for India, this is my basic tenet," he said.

Japan will provide $12 billion to build a bullet train that will run between the western cities of Mumbai and Ahmedabad.

Modi, who has been looking to Tokyo to pump in capital to overhaul the country’s infrastructure, said “this enterprise will launch a revolution in India’s railways and speed up India’s journey into the future.”

Under the two defense pacts signed, the two sides will share technology, equipment and military information.

Japan's Prime Minister Shinzo Abe, left, and his Indian counterpart, Narendra Modi, shares a moment during a signing of agreement at Hyderabad House in New Delhi, India, Dec/ 12, 2015.

These will make it possible for Japan to sell US-2 amphibious aircraft to India, a deal the two sides have been negotiating for two years. If that happens, it could be Tokyo's first major sale of weapons since Abe lifted a ban on export of defense equipment in 2014.

Defense relations

Modi said the two agreements will deepen growing defense relations.

The memorandum of understanding signed on civil nuclear energy is also seen as a vote of confidence by Tokyo in New Delhi, but officials said the final agreement will only be signed after technical details are finalized.

Japan is apparently looking for additional nonproliferation guarantees before it exports nuclear reactors to New Delhi, which is not a signatory to the Nuclear Nonproliferation Treaty.

“I know the significance of this decision for Japan and assure you that India deeply respects this decision and will honor our shared commitment," Modi said.

Analysts see the growing ties between India and Japan partly as a bid to contain China, with whom both have territorial disputes.

Growing ties

As he arrived in India Friday, Prime Minister Abe flagged the importance of their growing security ties, writing in an editorial in the Times of India that “in order to maintain an open, free and peaceful sea, it becomes important more and more for there to be collaboration between Japan and India, as well as the international community including the U.S.”

India this year invited Japan to participate along with the United States in naval exercises in the Indian Ocean, overriding Beijing’s objections.

Explaining why India deeply values the strategic partnership with Japan, Modi said, “No friend will matter more in realizing India’s economic dreams than Japan and I cannot think of a strategic partnership that can exercise a more profound influence on shaping the course of Asia and our interlinked ocean regions more than ours.”