Modi and Abe are two assertive nationalists who came to power on platforms pledging economic revival. They share a keen interest in neighbor China's growing regional ambitions.

Mutually appreciative messages have pinged back and forth on the micro-blogging platform since Modi won a landslide victory in India's general election on Friday.

"Personally, I have a wonderful experience of working with Japan ... I am sure we will take India-Japan ties to newer heights," Modi said in one of several tweets, the most effusive of his replies to foreign leaders who congratulated him.

Abe replied cheerfully on Tuesday from his @abeshinzo account: "@narendramodi Great talking to you, Mr. Modi. I look forward to welcoming you in Tokyo and further deepening our friendly ties."

Relations between India and Japan have gone from strength to strength in recent years, with cooperation on infrastructure projects, trade and defense that is watched closely by China.

Japan ranks 13th among India's top trading partners.

Official data showed trade between the countries was worth $18.5 billion in 2012/13, up from $13.7 billion two years earlier. But it is still far behind China, with which India shared $65.8 billion in trade in 2012/13.

During a January visit to New Delhi in which India and Japan agreed to crank up maritime security cooperation, Abe said their ties had "the greatest potential of any bilateral relationship anywhere in the world."

Advisers to 63-year-old Modi say growth is likely to accelerate after he is sworn in as prime minister on Monday.

Relations between the leaders go back at least seven years.

As chief minister of the western state of Gujarat, Modi met Abe when he visited Japan in 2007 and in 2012 - when the Japanese leader was in opposition. Later that year, Modi called Abe to congratulate him on his return to office.

"Modi's victory is likely to turn Indo-Japanese ties - Asia's fastest-developing bilateral relationship - into the main driver of India's 'Look East' strategy," Indian security analyst Brahma Chellaney wrote in a newspaper column this week.

Other than Modi, Abe follows his wife, Akie Abe, and Naoki Inose on Twitter.

Inose is an author-turned-politician who was forced to resign as governor of Tokyo last year after being caught up in a financial scandal just three months after he helped his city win a bid to host the 2020 Olympic Games.