Updated

Naguib Mahfouz, who became the first Arab writer to win the Nobel Prize in Literature for his novels depicting modern Egyptian life in his beloved, millennium-old corner of Islamic Cairo, died Wednesday, his doctor said. He was 94.

Mahfouz, who was accused of blasphemy by an Islamic militant and survived a stabbing attack 12 years ago, was admitted to the hospital last month after falling in his home and injuring his head. He died Wednesday morning after his health declined sharply, said Dr. Hossam Mowafi, head of a medical team supervising his treatment at the Police Hospital.

"His wife last night was whispering on his ears and he was smiling and nodding," Mowafi said.

The Nobel Prize, awarded to Mahfouz in 1988, brought international acclaim to the author, even though he had already established himself as one of the Middle East's finest and most beloved writers and a strong voice for moderation and religious tolerance. But fame had its perils.

In 1994, an attacker inspired by a militant cleric's ruling that a Mahfouz novel written decades before was blasphemous stabbed the then-82-year-old author as he left his Cairo home.

Mahfouz survived, but the attack damaged nerves leading to his right arm, seriously impairing his ability to write. A man who had once worked for hours at a time — writing in longhand — found it a struggle to "form legible words running in more or less straight lines," he wrote in the aftermath.

"Mahfouz was a cultural light ... who brought Arab literature to the world," Egyptian President Hosni Mubarak said in a statement. "He expressed with his creativity the values shared by all, the values of enlightenment and tolerance that reject extremism."

Mahfouz maintained a busy schedule well into his 90s. In his final years, he would go out six nights a week to meet friends at Cairo's literary watering holes, trading jokes, ideas for stories and news of the day.

He continued to work, producing short stories, sometimes only a few paragraphs long, dictating each day to a friend who would also read him the newspapers. His final published major work came in 2005 — a collection of stories about the afterlife entitled "The Seventh Heaven."

"I wrote 'The Seventh Heaven' because I want to believe something good will happen to me after death," the wispy-bearded writer told The Associated Press at his 94th birthday in December 2005. "Spirituality for me is of high importance and continuously provides inspiration for me."

Across the span of 34 novels, hundreds of short stories and essays, dozens of movie scripts and five plays, Mahfouz depicted with startling realism the Egyptian "Everyman" balancing between tradition and the modern world. Often the scene of the novels did not stretch beyond a few familiar blocks of Islamic Cairo, the 1,000-year-old quarter of the capital where Mahfouz was born.

The crowded neighborhood of alleys and centuries-old mosques is the setting for his masterpiece "Cairo Trilogy." The trilogy — "Palace Walk," "Palace of Desire" and "Sugar Street," all of which were published in the 1950s — details the adventures and misadventures of a Muslim merchant family not unlike Mahfouz's own.

The trilogy introduced a character who became an icon in Egyptian culture: Si-Sayed, the domineering father who lords his authority over his wives and daughters but holds the family together — a character Mahfouz drew from his own father.

It was his 1959 novel "Children of Our Alley," or "Children of Gebelawi," that brought him the most controversy. The book was an allegory for the series of prophets that Islam believes includes Jesus and Moses — Eissa and Moussa in Arabic — and culminates in the Prophet Mohammed.

First serialized in Egyptian newspapers in 1959, it caused an uproar much like Greek writer Nikos Kazantzakis's "The Last Temptation of Christ," published a year later.

Egyptian religious authorities banned it from being published in book form, but it was published in Lebanon and later translated into English.

The controversy resurfaced when Iran's Ayatollah Ruhollah Khomeini ordered the death of British writer Salman Rushdie for his novel "The Satanic Verses" in a 1989 fatwa, or religious verdict.

In a copycat fatwa the same year, Egyptian radical Sheik Omar Abdel-Rahman — later convicted of plotting to blow up New York City landmarks, including the United Nations — said Mahfouz deserved to die for "Children of Gebelawi." The writer's attacker five years later was inspired by the fatwa.

In late 2005, an Egyptian monthly magazine tried to publish the novel. Mahfouz said he wouldn't agree to republishing it without the consent of Al-Azhar, the prestigious Sunni Muslim clerical institution in Cairo. His position raised an outcry among many novelists who said he was bending to religious censorship — but it reflected his non-confrontational style and desire to see consensus.

"Children of Gebelawi" will be republished along with all Mahfouz's other works next year, his publisher said. "We had agreed with Mahfouz to celebrate his upcoming 95 birthday by publishing all his works without exception," Ibrahim el-Moallem, told AP on Wednesday.

Mahfouz spent most of his adult life working for the government, writing on the sidelines even as he grew more successful. He was a great defender of the Palestinian right to an independent state and a critic of U.S. foreign policy in the region, including the occupations of Iraq and Afghanistan.

But unlike the majority of Egypt's artists, Mahfouz has supported his country's peace treaty with Israel since it was signed in 1979.

Mahfouz moved easily between genres. His works of social realism painted Egypt's 20th century upheavals: promising young men die fighting British colonial rule, revolutions inspire and then bitterly disappoint, women strain against religious and traditional restrictions, gracious old manners surrender to modern ways.

"It has to do with the plight of humanity as a whole," said Fatma Moussa, a renowned Egyptian critic and writer. "He has presented it from the local angle, but it's not really local at all. It's kind of a microcosm of the whole world, a little image of the fate of man."

A military funeral will be held for Mahfouz on Thursday at a Cairo mosque, with his coffin covered with an Egyptian flag and carried by caisson. Mahfouz was survived by his wife, Attiyatullah, and two daughters, Fatima and Umm Kulthoum.