WASHINGTON — In a letter last month to Ayatollah Ali Khamenei, President Obama urged Iran’s supreme leader to seize the opportunity of the Nov. 24 deadline for negotiating a nuclear agreement with the West, arguing that Iran’s interests in the Middle East would be served by proving its interest in nuclear technology was solely for the production of electricity, according to senior administration officials.

The letter, first reported by The Wall Street Journal on Thursday, also noted that the United States and Iran had common interests in fighting the forces of the Islamic State, also known as ISIL, in Iraq, and reassured Iran’s leaders that, in the words of one administration official, “we’re only there to fight ISIL and you should let us do it, because it will help you.”

Officials would not say if Mr. Obama had received a response, but past letters to Ayatollah Khamenei have usually resulted in lengthy diatribes about American intentions in the region.

The main sections of the letter were intended to urge the supreme leader to make a fundamental choice on a nuclear deal before his negotiators enter their last set of talks, first in Oman this weekend, led by Secretary of State John Kerry, and then in Vienna. Many senior American officials fear that the result could be inconclusive, producing a vague statement of principles and another extension.