It just didn't make sense. The samples sent to the lab should have come back inactive and stable, and yet here they were attacking the virus they'd done nothing so many times before.

When Chris McGuigan, Professor of Medicinal Chemistry at Cardiff University, was researching anti-HIV drugs, he'd stumbled across a new family of compounds that attack the VZV virus, directly responsible for shingles, which affects some 2 million people in developed countries every year.

McGuigan's discovery might have seemed little more than a fluke. But however exact one might consider their profession, scientists can depend just as much on the 'happy accidents' that occur in their labs as they can on the formulas they've painstakingly drawn up and followed to a T.

From penicillin to X-ray, Pacemakers to Viagra, some of the world's greatest advances in medicine have been the result of such serendipity - be it a mistake made in a test tube or the misreading of a note left in a lab.

It may not be credited as such in official journals, but serendipity plays such an integral role in medicine even today that some scientists swear they couldn't do their job without it.

You can thank 'happy accidents' for being able to see just where you broke your wrist (thanks to an X-ray), or for treatment for testicular cancer (a stroke of luck in the lab). Such serendipitous stumbles are now also being commemorated through a new government Science: [So what? So everything] campaign, aimed at reminding us of all the lucky discoveries we take for granted in our daily lives.

A brief history of medicine

Some $80 billion is spent worldwide each year developing new medicines, according to the Pharmaceutical Industry Association of America, yet the money-to-drug breakthrough rate is extremely low. Despite massive advances in technology, science and genomics, only 20 new medicines emerge every year - with the average taking around 17 years to go from test tube to pharmacy shelf.

To increase such appalling odds, scientists tend to rely on a process called 'rational design', which uses modern chemistry and molecular graphics to identify - and then impede - particular enzymes or targets in a virus or disease.

"Rational design essentially gives us a better chance of success, rather than doing things randomly," explains McGuigan, having used such a method to treat diseases such as hepatitis B and C, herpes, cancer and osteoarthritis.

"Even if you target an enzyme, statistically the chances of getting a drug out of it are one in a million."

In a world where cures are hard to come by using even the most advanced scientific techniques, serendipity "can often seem like chance, as though you're as lucky as a lottery winner" to make a breakthrough, says McGuigan.

"But it plays a very significant role and is well known in many [scientific] fields."

Sweet discoveries

"That's just the nature of blue-sky science: you don't know quite where it's going but then Bam! There's a great breakthrough," says Dr Alison Campbell of King's College London, home itself to the serendipitous discovery of sucralose - otherwise known as Splenda - in 1976.

The non-calorific natural sweetener was 'discovered' after the simple misreading of an instruction, which called for lab staff to test a sugar compound.

"One assistant misread 'test' for 'taste' and found that it was incredibly sweet," explains Dr Campbell. "After looking at the derivatives of sugar, they found that the compound was much stronger than traditional sugar, but just as effective and safe."

Sucralose is some 600 times sweeter than table sugar, twice as sweet as saccharine and three times sweeter than aspartame. Because it doesn't cause tooth decay or have any calories, unlike normal sugar, it has been heralded as a Godsend by many with a sweet tooth.

Such a discovery might seem the luck of the draw (not to mention a deviation from health and safety regulations), but there could actually be a method behind the supposed madness, says McGuigan.

"[French scientist] Louis Pasteur once said that chance favours the prepared - or informed - mind," he explains. "Had someone stumbled upon this 'oddity' in the past and not been tenacious enough to pursue it, it would have been lost."

What are the chances?

Just how much modern medicine owes to serendipity is unknown, although some, such as McGuigan, are convinced that it is far more common than we think.

"Whether it's responsible for 10% or 50% of all breakthroughs, I don't know," he says.

"But I'm certain serendipity is frequently hidden, as it's almost unknown to be addressed as 'serendipity' in scientific journals."

In the same way that it might favour a 'prepared mind', however, so too might serendipity prefer good timing.

"We've always needed a cure for shingles, for example, but this came along when we could find it, observe it and exploit it," explains McGuigan.

"There must be occasions when a 'cure' happens at the wrong time in the wrong lab, where there's no funding and it's not pursued."

Ironically, that was very nearly the fate of Cardiff University's shingles breakthrough as well.

"It took us four years to get funding, because all the big companies said it just wasn't a big enough deal - shingles isn't chronic nor is it a killer," admits McGuigan, whose shingles drug, Inhibitex, is 10,000 times stronger than the current treatment and has now finally entered clinical trials.

"Every week the uni said we should abandon it, and I ended up funding it myself to carry it through. It just shows you how easily we could have lost it."

It might not have been the cure for HIV that he was initially researching, but it's a scientific breakthrough that McGuigan - and, perhaps, the rest of the world - won't soon forget.

"My inbox is swamped with mail from shingles sufferers saying life is not bearable, their pain is so bad," he says.

"If I can go down as being the inventor of a drug that improves the life of 2 million people a year, I will be the happiest man on Earth."

Some other "serendipitous" discoveries

Penicillin

British scientist Alexander Fleming returned from holiday in 1928 to discover his scientific cultures covered in mould. Noting that the mould had actually inhibited bacterial growth in some of the dishes, he was able to isolate a particular extract, and penicillin was born.

X-ray

Whilst investigating cathodic ray tubes, German physicist Wilhelm Roentgen noted that the invisible rays had caused a fluorescent, see-through effect. His discovery enabled scientists to see inside the human body without the need for surgery for the first time - a feat for which he won the first-ever Nobel Prize in 1901.

Pacemakers

Canadian electrical engineer John Hopps was experimenting with radio frequency heating to treat hypothermia when he discovered that if a heart stopped beating due to cooling, it could be started again using a mechanical or electrical stimulus. He invented the first cardiac pacemaker in 1950.

Viagra

Perhaps serendipity's best-known 'discovery' to date, Viagra was being trialled for hypertension until UK researchers noted that it had a particularly striking side effect when trialled on healthy men - involuntary erections.