(CNN) -- A young blogger arrested in Iran for allegedly insulting supreme leader Ayatollah Ali Khamenei in an Internet posting has died in prison, his attorney said Friday.

The blogger had been jailed for allegedly insulting Ayatollah Ali Khamenei in an internet posting.

Attorney Mohammad Ali Dadkhah said Omid Mir Sayafi, reported to be in his 20s, died in Evin prison, which is located in Tehran and known for its wing that holds political prisoners.

Dadkhah said a fellow inmate, Dr. Hessam Firouzi, called him Wednesday night with the news -- and said he believed Sayafi would have lived if he received proper medical care.

Dadkhah said Firouzi, an imprisoned human-rights activist, said that he carried a semi-conscious Sayafi to a prison doctor but that he didn't receive the care he needed.

"It was Dr. Firouzi's opinion that if he would've received proper medical attention, he would not have died," Dadkhah said.

He said Sayafi was buried on Thursday and that his calls to the prison asking for an explanation have not been returned.

Dadkhah said Sayafi "sounded OK" at about 2 p.m. on Wednesday when he last spoke to him by telephone. He said the blogger asked for a book about Nowruz, the Iranian New Year, which begins Friday.

The International Campaign for Human Rights in Iran, which advocates for activists in the country, quoted Firouzi on its Web site as saying Sayafi suffered from depression and had taken extra doses of medication on Wednesday.

The group blamed Iran's government for unsafe conditions in its prisons.

"Iranian leaders have relegated the administration of the prison system to a group of incompetent and cruel officials who are showing their utter disregard for human life," said Hadi Ghaemi, spokesman for the campaign. "If the authorities do not move quickly to hold negligent officials responsible, they are reinforcing impunity and the lack of accountability."

Sayafi was first arrested in April, then released for 41 days before being arrested again. He was sentenced to 2½ years in prison for comments on a blog that his lawyer argued was intended only for a few friends to read.

All About Iran • Ayatollah Ali Khamenei • Tehran