LE BOURGET, France — Since Prime Minister Narendra Modi came to power, President Obama has not missed many opportunities to convey what a warm rapport he has forged with the Indian leader.

There was the admiring essay about Mr. Modi that Mr. Obama wrote in Time magazine, and the image of them tête-à-tête at the Martin Luther King Jr. Memorial in Washington, their entourages left behind. Mr. Obama’s national security adviser said the two men had “chemistry” and expressed confidence that American interests made it “worth the investment in the relationship.”

Exactly how much that investment has paid off will become clear this week during the climate negotiations on the outskirts of Paris, where India, the world’s third-largest greenhouse gas polluter, has emerged as a pivotal player in shaping the outcome of a deal on which Mr. Obama hopes to build his legacy — or whether a deal emerges at all. So far, Indian negotiators have publicly staked out an uncompromising position.