Image caption JK Rowling criticised newspapers for publishing plot details of her final Harry Potter book

Knowing how a book ends does not ruin its story and can actually enhance enjoyment, a study suggests.

Researchers at the University of California San Diego gave participants 12 short stories where two versions were spoiled and a third unspoiled.

In all but one story, readers said they preferred versions which had spoiling paragraphs written into it.

Although the study could not explain why, it suggested the brain may find it easier to process a spoiled story.

"You get this significant reverse-spoiler effect," study author and professor of social psychology Nicholas Christenfeld said.

"It's sort of as if knowing things puts you in a position that gives you certain advantages to understand the plot."

Co-author Jonathan Leavitt added: "It could be that once you know how it turns out, you're more comfortable processing the information and can focus on a deeper understanding of the story."

Prof Christenfeld said this suggested people may enjoy a good story as much as a good twist at the end, and even if they know the outcome, will enjoy the journey as much as the destination.

He added in many cases, a book or film can be re-read or seen multiple times and still be enjoyable.

For the study, short stories written by authors including Agatha Christie, John Updike and Anton Chekov were read by volunteers who had never seen them before.

Some read the stories as originally written, some had a spoiler paragraph incorporated into the story and others had an introductory spoiler paragraph and then were asked to rate them on a scale of 1 to 10.

Even when the stories contained a plot twist or mystery, subjects preferred the spoiled versions.

The researchers concluded the study, which will be published in September's Psychological Science journal, showed that the success of entertainment did not rest on simple suspense alone.

Please be aware the comments below may contain some plot spoilers.