When it comes to the science of surviving a potentially deadly disease outbreak, there's one question that has always proved particularly tricky for experts.

How do you study the spread of an epidemic, and thus form an emergency plan to ensure the survival of the human race, without putting the population at risk of a real disease?

Researchers have now made an unlikely breakthrough, thanks to a glitch in a fantasy computer game.

• Click here to visit FOXNews.com's Video Gaming Center.

In the massively multiplayer online role-playing game called "World of Warcraft," created and supported by Blizzard Entertainment, an unexpected software error provided a ready-made scenario for studying the effects of an epidemic.

The 6.5 million players who control characters in the game supplied the necessary element of unpredictable human reactions without any risk to the real world.

The discovery, revealed in next month's issue of The Lancet Infectious Diseases journal, has been hailed a significant step forward in understanding how a deadly virus could break out.

"By using these games as an untapped experimental framework, we may be able to gain deeper insight into the incredible complexity of infectious disease epidemiology in social groups," wrote the authors, Eric Lofgren, of Rutgers University and Nina Fefferman of Tufts University.

It all happened by accident. In September 2005, what was intended as a minor hindrance for a small group of characters spiraled beyond the control of program-makers into a full-blown epidemic.

A new villain, a winged serpent called Hakkar the Soulflayer, originally designed as a "boss challenge" for only the strongest characters, started transmitting a spell called "Corrupted Blood" that knocked hundreds of life points of each player who confronted him.

Stronger players with thousands of points would survive, but weaker ones — not typically able to enter the dungeon of Zul'Gurub where Hakkar the Soulflayer resided — would die quickly.

The spell was designed to spread from player to player, but only within the Zul'Gurub dungeon. Due to a software flaw, however, it was transmitted by players' virtual pets into the wider "Warcraft" world, killing off weaker players en masse and turning entire cities into plague zones.

["It really looked quite a bit like a real disease," Fefferman told Reuters.]

The scientists were able to monitor how quickly and where to the disease spread within each "Warcraft" server, while assessing players' individual responses to the outbreak.

Particular features of the game, such as the many hours players around the world dedicated to it and the emotional investment they put into their online alter egos, offered scientists a tantalizingly close match to real social conditions.

As the virus spread, very real challenges emerged, such as the failure of quarantine measures, further transmission by characters' pets and the existence of "immune" characters who acted as carriers, passing the virus to others while failing to succumb to symptoms themselves.

[Fefferman told Reuters that many players approached infected areas just to see what was going on, only to be infected themselves — the "stupid factor" that classic models of epidemiology don't take into account.

"No one has ever looked at what would happen when people who are not in a quarantine zone get in and then leave," she said.]

Blizzard Entertainment's own attempts at quarantine failed, forcing its coders to reset the Zul'Gurub software so "Corrupted Blood" could not be carried outside the dungeon.

Fefferman said that the findings could be of great value to public health officials in developing the best way to manage the flow of information in such a crisis.

"If, God forbid, a disease broke out in London, you could see what would happen if people were told immediately of the risk," she said. "Would there be panic and chaos, or would it allow them to psychologically accept the danger and act accordingly? What would happen if we made people feel too reassured?

"These are all things that have a great impact on the number of people who would be affected," Fefferman added. "They are also things we just don't know, so [virtual games] could be of great value in helping us understand what their true emotional responses would be."