Prime Minister Shinzo Abe follows only three people on Twitter: his outspoken wife, a scandal-tainted politician and India's Prime Minister-elect Narendra Modi.
Modi and Abe are two assertive nationalists who came to power on platforms pledging economic revival. They share an interest in neighbor China's growing regional ambitions.
Mutually appreciative messages have pinged back and forth on the online service 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.
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. Japan also 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.
With your current subscription plan you can comment on stories. However, before writing your first comment, please create a display name in the Profile section of your subscriber account page.