President Trump and Indian Prime Minister Narendra Modi shake hands while making statements on June 26 in the Rose Garden of the White House. (Jabin Botsford/The Washington Post)

The image of the United States in India is starting to tarnish under President Trump's leadership, a new survey shows.

Only 40 percent of Indians expressed confidence in Trump when handling world affairs, down 34 percentage points compared to the Obama administration, according to a survey released by the Pew Research Center.

Still, Indians are more upbeat about the United States' image than people in many other countries. Roughly half of the 2,464 Indians surveyed in February and March 2017 had a positive view of Trump's America, down seven percentage points compared to President Barack Obama's final year in office. But those numbers are significantly higher than Trump's approval ratings in Japan (24 percent) or Indonesia (23 percent).

Trump's hard-line stance on Islamist terrorism may partly explain his relative popularity in India, where militancy in neighboring Pakistan is perceived as a perennial threat. According to the survey, 42 percent of Indians thought Trump is a strong leader, and 41 percent thought he is well-qualified to be president.

Despite the dip since the Obama years, Indians view Trump more optimistically than respondents worldwide. According to a survey released in June, a median of 75 percent of people in 37 different countries described Trump as “arrogant,” compared to only 26 percent in India; 65 percent of global respondents thought he is “intolerant” compared to 17 percent in India.

Respondents of the survey also indicated more favorable views of the United States than of neighboring China; only 21 percent of people expressed confidence in Chinese President Xi Jinping. The survey was conducted before border tensions erupted between India and China earlier this year.

Trump and Modi met on the sidelines of the Association of Southeast Asian Nations summit on Monday, reiterating messages about the countries' strong economic and strategic partnership.

“We've had him at the White House, and he's become a friend of ours and a great gentleman doing a fantastic job in bringing around lots of factions in India — bringing them all together,” Trump said.

Modi, in response said that the United States and India's ties are “growing very rapidly with a great deal of speed.” He said, “And we are working together for the interest of the future of Asia and for humanity as a whole in the world.”

Trump's comment about Indian unity came despite Modi's Hindu nationalist Bharatiya Janata Party (BJP) has been associated with divisive policies inflaming religious tensions between Hindus and Muslims such restrictions on cow slaughter, an animal considered holy by Hindus, and linked to a rise in vigilante attacks against Muslims accused of carrying or trading beef. Recently, a prominent member of the BJP said that the Taj Mahal “did not reflect Indian culture” because it was built by a Muslim king.

Maintaining ties with India has been a keystone of U.S. foreign policy in recent decades. India is a huge market for American weapons and is seen as a potential ally in the region to contain an increasingly powerful Beijing. In June, Modi was the first foreign dignitary Trump hosted for dinner at the White House and in October, India started receiving crude oil shipments from the United States, which had been stopped in 1975.

Meanwhile, Modi remains overwhelmingly popular among Indians, the survey suggests, despite a slew of controversial policies introduced in the past year. Nearly 9 in 10 Indians surveyed held a favorable view of their leader, with 8 in 10 expressing a positive view on economic conditions in India. According to the survey, “No other major political figure in India approaches Modi's level of public support.”

The survey was conducted in regions accounting for 90 percent of the country, but left out some states where there is resistance to the BJP, including the communist-run state of Kerala and the insurgent state of Jammu and Kashmir. Surveyors say states were left out of polling for safety reasons.

The survey took place before India's messy rollout in July of a controversial Goods and Services tax that consolidated various state-run tax regimes into a single market for the first time.

Modi's popularity was reflected in recent state elections, with the BJP sweeping up votes in key states such as Uttar Pradesh in February. Bookies favor the Hindu nationalist party to outpace rivals in upcoming elections in his home state of Gujarat and the Himalayan state of Himachal Pradesh.

Approximately 3 out of 4 Indians said that a lack of employment opportunities is a “very big” problem in India. But around the same number approved of Modi's handling of it.

Modi also ranked highly for his handling of corruption, helping the poor and fighting terrorism.

Not all of Modi's numbers were overwhelmingly favorable: 50 percent approved of Modi's handling of religious and caste-based tensions, around the same percentage approved of his efforts to curb air pollution. But these issues also were relatively low priorities, the survey indicated.

The survey also makes illuminating revelations about the functioning of democracy in India. Though 79 percent of people said they were satisfied or very satisfied with the way democracy works in the country, two-thirds of Indians said the country would be better run by technocrats than elected officials, and 53 percent of respondents said they favored military rule.