DAVOS, Switzerland — Prime Minister Narendra Modi of India issued a strong call on Tuesday for nations to embrace globalization, combat climate change and strengthen international institutions like the World Trade Organization.

“Forces of protectionism are raising their heads against globalization,” Mr. Modi said during a speech to the World Economic Forum here. “Their intention is not only to avoid globalization, but they also want to reverse its natural flow.”

Notably missing from the speech was any mention of recent moves by Mr. Modi’s own government to restrict imports into India as part of a broad industrial policy meant to force foreign companies to increase manufacturing operations in the country. In essence, he is pursuing a protectionist agenda, at odds with the mantra of globalization.

Mr. Modi’s speech reflects the tenor of the times. As President Trump pushes an “America First” strategy, global leaders are lining up to position themselves as a counterpoint, even if there is sometimes a disconnect between the rhetoric and the reality.

In Davos last year, President Xi Jinping of China positioned himself as a champion of economic globalization in a rebuke to Mr. Trump, who, as president-elect at the time, was threatening to impose steep tariffs. Yet China has long bent the rules of commerce to fit it own needs.

Mr. Modi is following a similar path in India, as he looks to nurture growth in his sprawling economy and to create jobs.

Last month, India’s government imposed stiff tariffs on imports of cellphones, video cameras and televisions. The move put heavy pressure on Apple, which ships most of the iPhones it sells in India from China, to do more manufacturing in India.

Mr. Modi’s government is also considering a recommendation by India’s Directorate General of Safeguards, Customs and Central Excise that the country impose 70 percent tariffs on imported solar panels. Such a move would appear to conflict with Mr. Modi’s call here for international action on climate change. Introducing such stiff tariffs could well encourage the production of more solar panels in India, but it could also make solar power far more expensive for Indian consumers and, in turn, hurt the fight against climate change.

At 70 percent, the tariffs that India is considering on imported solar panels would be more than double those that the Trump administration said on Monday it would impose on such panels. Mr. Modi did not indicate in his speech what his government might decide on the issue.

The Trump administration faces a dilemma of its own over whether to follow India’s lead in placing tariffs on consumer electronics. Mr. Trump’s trade advisers are considering whether to limit imports of such goods from China amid a broader dispute over whether Chinese companies are systematically violating American intellectual property.

Mark Wu, a former trade negotiator for the United States who is now an assistant professor of trade law at Harvard University and who attended Mr. Modi’s speech, said India faced a challenge in terms of imports: attracting foreign manufacturers without appearing to violate international trade norms.

“While the prime minister articulated all the right messages on globalization at Davos, his government remains firmly committed to a strategy of leveraging its market size to drive industrial policies to spur greater high-tech manufacturing in India,” Mr. Wu said. “This is bound to cause greater trade frictions ahead.”

In his speech, Mr. Modi echoed many of the pro-globalization themes expressed here last year by Mr. Xi, the leader of the country with the highest import tariffs of any large economy besides India.

Although he did not mention China, Mr. Modi extolled India as a model of political openness and economic growth. “We Indians very well understand the importance of a democratic environment and freedoms,” he said.

China has begun to push hard in recent months to address its environmental problems, replacing coal-fired heating systems with natural gas where possible and closing factories that are heavy polluters. Pollution in India, which is at least a decade behind China in raising its citizens’ standard of living, continues to increase.

A ranking of countries on pollution and ecosystem protection released here on Tuesday showed India falling to 177 out of 180, down from 156 two years ago. By comparison, China was No. 120 on the list, which was compiled by Yale’s Center for Environmental Law and Policy.

“They are driving economic growth, but not paying attention to what I would call the parallel challenge of sustainable development: avoiding environmental degradation,” Daniel Esty, the center’s director, said of India.

As in the United States, industrial policies in India meant to foster domestic manufacturing can collide with a push by environmentalists and clean-energy electric utilities for solar panels, even imported ones, to be deployed as widely and as cheaply as possible. Among the other people attending Mr. Modi’s speech was Sumant Sinha, chairman and chief executive of ReNew Power Ventures, a company based on the outskirts of New Delhi that builds clean energy projects.

Mr. Sinha said he admired Mr. Modi’s efforts to make it easier for foreign and domestic companies alike to do business in India. But he said he also worried that if the recommendation for 70 percent tariffs on imported solar panels were adopted, solar energy could become unaffordable for many Indians.

“The person buying the power would like the cost of the power to be as low as possible,” he said.

Devendra Fadnavis, the chief minister of Maharashtra, the vast Indian state that includes Mumbai and big manufacturing cities like Pune, also attended Mr. Modi’s speech. He said that he saw growing interest among companies from outside India to manufacture in the country. Foxconn, the giant Taiwanese manufacturer that produces the bulk of Apple’s consumer electronics, is in negotiations with Maharashtra officials to set up a large factory there.

Maharashtra has offered Foxconn land at a major Mumbai port as a way of addressing the company’s concerns about transportation links in India, Mr. Fadnavis said. But he also offered a strong defense of India’s tariffs on imports, saying that the country’s large number of poor farmers made it important to proceed carefully.

“We want to open the door,” he said. “On the other hand, we want to protect our domestic concerns, like food security and the farmers.”