Activists with India’s Hindu Sena party pose with posters of Russian President Vladimir Putin, Indian Prime Minister Narendra Modi and President Trump in New Delhi. (Sajjad Hussain/Agence France-Presse via Getty Images)

One man came from privileged beginnings and went to all the right schools, the other was the son of a tea seller.

Yet both Indian Prime Minister Narendra Modi and President Trump rose to power as populist outsiders willing to disrupt entrenched power systems in their respective capitals.

The two men spoke Tuesday, their first interaction since a brief congratulatory phone call after Trump’s election in November. In a summary of the call, the White House said that Trump called ­India a “true friend and partner” and that the two discussed the ­economy, defense and the fight against global terrorism. Trump said that he looked forward to hosting Modi in a visit later this year, and Modi returned the favor after the “warm conversation” in a tweet later.

The change of power in Washington comes at a time when the relationship between the world’s two largest democracies has gained momentum in recent years, with growing investment and military ties.

“We believe they mean well by us and we mean well by them,” said Subrahmanyam Jaishankar, India’s foreign secretary. “We are quite confident we’ll get off to a good relationship, so there is no anxiety here at all.”

Yet some Indian leaders have expressed concerns privately about Trump’s unpredictability and tendency to lash out.

On the campaign trail, Trump occasionally praised India in speeches — “I am a big fan of Hindu, and I am a big fan of India,” he said at a fundraiser in October, and he said India was a “natural ally.”

But he also mimicked the accent of India’s call center workers, vowed to keep American jobs in the United States and criticized the H-1B high-skilled worker visa program, worrying the Indian tech industry. The Trump Organization is also involved in at least four real estate projects here in India, valued at an estimated $1.5 billion.

“There’s a lot of uncertainty in the air,” said Milan Vaishnav, senior fellow at the Carnegie Endowment for International Peace and the author of a recent book on politics in India. “Nobody really knows beyond some vague outlines what Trump foreign policy looks like. He hasn’t said a lot about India, and what he has said is very vague. So India’s objective is to figure out where he stands.”

The two men are likely to find common ground going forward on terrorism and security, particularly in regard to the terrorist threat from neighboring Pakistan, experts said. Judging from Tuesday’s telephone call, “clearly terrorism was front and center,” Vaishnav said.

In his inaugural address, Trump pledged to stamp out ­Islamist terrorism around the world. But he earlier engaged in a chummy telephone call with ­Pakistan’s Prime Minister Nawaz Sharif — calling him a “terrific guy” who does “amazing work” — which also troubled Indian ­officials.

Modi, 66, has long been associated with the Hindu nationalist movement Rashtriya Swayamsevak Sangh, and for a time was denied a U.S. visa for failing to stop anti-Muslim riots while serving as a state chief minister.

He went only after his party’s victory in 2014. He and President Barack Obama developed a rapport, and the next year he asked Obama to be the chief guest at India’s ­Republic Day parade. By the end of that visit, he was calling the president Barack.

Like Trump, Modi has a brash side and communicates largely on Twitter, with an innate ­distrust for the mainstream ­media. One of his first acts as prime minister was to do away with a traveling press pool on foreign trips.

His supporters in the Hindu right have stoked nationalistic fervor in the country — at times with violent results — and last year India became immersed in a debate over patriotism and free speech after protests on college campuses. Most recently, the ­Supreme Court mandated that moviegoers must stand as the national anthem plays before films.

Modi remains a popular figure, however, despite a recent move to ban large-denomination currency notes — to combat tax cheats — that left the economy reeling. Indians have suffered job losses and waits in long bank lines during the more than two-month crisis, but Modi has repeatedly played on nationalist sentiment, exhorting Indians to have patience for the long-term good of the country.

Read more:

India welcomes foreign companies, but is the nation ready for them?

U.S. military wants India to counterbalance China’s rise as a sea power

Trump’s extensive deals in India raise conflict-of-interest concerns

Today’s coverage from Post correspondents around the world

Like Washington Post World on Facebook and stay updated on foreign news