Amir Hekmati, a former Marine who began a hunger strike and wrote to President Obama this week in despair over his prolonged incarceration in Iran, also has protested to Iranian officials over the apparent paralysis of his case, untreated lung infections, and the prison’s cold cells, power blackouts and vermin.

In a letter to the ministers of justice and intelligence, Mr. Hekmati also said that he had been warned by the authorities at Evin Prison in Tehran, where he has been held for more than three years, to quit the hunger strike or he would be placed in solitary confinement.

The case of Mr. Hekmati, 31, has become a festering irritant in the estranged relations between Iran and the United States. He was arrested while visiting relatives in Iran in August 2011, convicted of espionage and sentenced to death, but the conviction was overturned. He was then convicted of helping a hostile country, a reference to the United States, and sentenced to 10 years.

An American of Iranian descent from Flint, Mich., Mr. Hekmati has asserted his innocence and called himself a pawn in a far deeper dispute that began before he was born. An appeal of his second conviction has languished.