Prime Minister Narendra Modi of India will meet with President Vladimir V. Putin of Russia this week, a visit that signals the Indian leader’s determination to stick to his own diplomatic path even as the West continues to isolate Moscow over its war on Ukraine.

For Mr. Putin, Mr. Modi’s visit will be a way for Russia to show that the Kremlin continues to have a strong partnership with India even as the world’s fifth largest economy has deepened its relations with the United States. India’s purchases of discounted Russian petroleum have helped fill Russia’s coffers depleted by international sanctions over the war, and Russia has sought to cast India as a partner in reshaping the Western-dominated global order.

This is the first visit to Russia by Mr. Modi in five years. He is expected to land in Moscow on Monday and attend a dinner hosted by Mr. Putin. The two leaders are set to discuss trade, energy and military ties when they sit down for talks on Tuesday.

The South Asian nation became a major buyer of cheap Russian oil at a time when sanctions by Western countries limited what Russia could sell or charge for the product in international markets. India is building massive nuclear energy power plants with technical assistance from Russia. Russia is also India’s biggest supplier of arms, making the relationship key for India, which has long had to defend its borders against China.

The meeting in Moscow on Tuesday would coincide with the first day of a high-profile summit of NATO leaders in Washington. During the NATO meeting, Western allies are expected to announce additional air defense systems for Ukraine and offer assurances of the alliance’s long-term commitment to Kyiv’s security.

Speaking to reporters in New Delhi ahead of Mr. Modi’s trip, Indian officials said the summit between Mr. Modi and Mr. Putin was of “great importance,” but emphasized that relations with Russia were not aimed at any third party. They also sought to downplay the timing of the meeting.