Image copyright Author Image caption Keyes got the idea for his most famous novel while waiting for a train

Daniel Keyes, the writer of Flowers for Algernon, which was turned into the Oscar-winning film Charly, has died aged 86.

The 1958 book, about a mentally disabled man who undergoes treatment to increase his intelligence, won a Nebula science fiction award.

Cliff Robertson won best actor at the 1969 Oscars for the playing Charly Gordon in the film version.

Keyes died from complications of pneumonia, his daughter Leslie said.

The author was born in New York City in 1927 and briefly attended university before joining the US Maritime Service aged 17.

After leaving, he returned to his studies and, in 1950, gained a bachelors degree in psychology.

Upon graduation, Keyes became a science fiction magazine editor and worked under Spider-Man creator Stan Lee, before becoming a full-time writer for Entertaining Comics.

According to his autobiography, Flowers for Algernon stemmed from a short, one-paragraph synopsis for a story called Brainstorm.

The eponymous Algernon is a laboratory mouse who has undergone surgery to increase his intelligence. The story is told by a series of progress reports written by menial worker Charlie Gordon, the first human test subject for the surgery.

With an initial IQ of just 68 Charlie sees his intelligence grow to 185 in a few short months, surpassing his friends, colleagues and even the scientists who worked with him on the treatment.

But when Algernon begins to regress suddenly, Charlie realises the same will happen to him.

Image copyright Rex Features Image caption Cliff Robertson won an Oscar for the film Charly

The book won the the Hugo Award for Best Short Story in 1960. By 2004, it had been translated into 27 languages and sold more than 5 million copies.

Touching on subjects such as the treatment of the mentally disabled, the novel has been taught as part of the school curriculum in the US.

It has also been the subject of censorship rows. Until 2000, the book was one of the American Library Association's list of the 100 most frequently challenged books and was removed from libraries in Pennsylvania and Texas.

The Simpsons

As well as cinematic and stage adaptations, the book inspired a musical, starring Michael Crawford, and an episode of The Simpsons.

In the episode, called Homr, Homer Simpson discovers that a crayon lodged in his brain has been responsible for his stupidity.

On its removal, Homer becomes clever, only to have the crayon re-inserted after becoming distanced from family and friends.

Aired in 2001, the episode won an Emmy for outstanding animated programme.

Keyes, who was a professor of English and creative writing at Ohio University, published four further novels and several non-fiction books, including The Minds of Billy Milligan, about a criminal with 24 distinct personalities.

His wife, Aurea Georgina Vazquez, died in 2013 after 61 years of marriage.

In addition to his daughter Leslie, he is survived by another daughter, Hillary Keyes, and a sister, Gail Marcus.