Image caption Nigel Hawthorne in the National Theatre production of The Madness of George III

Modern medicine may help us to discover the real reasons behind King George III's erratic behaviour, writes historian Lucy Worsley.

George III is well known in children's history books for being the "mad king who lost America".

In recent years, though, it has become fashionable among historians to put his "madness" down to the physical, genetic blood disorder called porphyria. Its symptoms include aches and pains, as well as blue urine.

The theory formed the basis of a long-running play by Alan Bennett, The Madness of George III, which was later adapted for film starring Nigel Hawthorne in the title role.

However, a new research project based at St George's, University of London, has concluded that George III did actually suffer from mental illness after all.

A royal biography George William Frederick born in London 1738, died Windsor Castle 1820

King of Great Britain and Ireland from 1760 and King of Hanover from 1814 until his death

Became heir to the throne at 12 when his father, Frederick Louis, died in 1751

Wed Charlotte Sophia of Mecklenburg-Strelitz in 1761 - the marriage lasted for 50 years

Intermittently mad for the last 11 years of his reign, during which his son - the future George IV - acted as regent George III and loss of the American colonies More on George III And the four Georges

Using the evidence of thousands of George III's own handwritten letters, Dr Peter Garrard and Dr Vassiliki Rentoumi have been analysing his use of language. They have discovered that during his episodes of illness, his sentences were much longer than when he was well.

A sentence containing 400 words and eight verbs was not unusual. George III, when ill, often repeated himself, and at the same time his vocabulary became much more complex, creative and colourful.

These are features that can be seen today in the writing and speech of patients experiencing the manic phase of psychiatric illnesses such as bipolar disorder.

Mania, or harmful euphoria, is at one end of a spectrum of mood disorders, with sadness, or depression, at the other. George's being in a manic state would also match contemporary descriptions of his illness by witnesses.

They spoke of his "incessant loquacity" and his habit of talking until the foam ran out of his mouth. Sometimes he suffered from convulsions, and his pages had to sit on him to keep him safe on the floor.

The researchers have even thrown doubt on one of the key planks in the case for porphyria, the blue urine. George III's medical records show that the king was given medicine based on gentian. This plant, with its deep blue flowers, is still used today as a mild tonic, but may turn the urine blue.

So maybe it wasn't the king's "madness" that caused his most famous symptom. It could have simply been his medicine.

I interviewed the researchers at St George's for a new documentary series, Fit To Rule: How Royal Illness Changed History.

In this series, I re-examine our kings and queens as individual members of the human race, rather than just as impregnable icons of splendour and power. They suffered many of exactly the same biological and psychological weaknesses as the rest of us - only with rather more serious consequences.

George III's recurring bouts of illness caused him to withdraw from daily business to recuperate out of the public eye at secluded Kew Palace, near Richmond.

Each time he withdrew to Kew, this triggered a crisis - who was to make decisions in his absence?

His son, the Prince of Wales, with whom George III had a terrible relationship, wanted to be appointed regent, and to act as the king in everything but name. But the future George IV was very much associated with the political opposition, and the government was determined to keep him out.

Find out more Lucy Worsley examines how royal illness changed history in Fit To Rule, 15 April at 21:00 BST on BBC Two Watch Fit To Rule on iPlayer

Strikingly, although the crisis caused a good deal of arguing, it was in fact resolved quite easily. This was partly because the king just got better (despite the bizarre and sometimes inhumane treatments given to him by the royal doctors) and partly because he was, by this stage in British history, a constitutional king.

When the Hanoverians had been invited over from Germany in 1714 to take the throne after the failure of the Stuart line, they came at the invitation of Parliament. Parliament therefore held the whip hand over them, and the powers of the monarchy declined.

But despite his illness, George III was a dedicated and diligent king, and won the respect of his politicians. In fact, when his illness drove him off the political scene, they realised how much they needed his calming effect on their squabbles.

It is counter-intuitive to suggest it, but royal health issues can actually strengthen the monarchy, not least by creating sympathy and affection for an afflicted individual.

Image caption George III ruled for 60 years

Garrard also points out how the explanations or diagnoses that we come up with for patients in the past reflect our own current attitudes to sickness and health. One of the reasons that the porphyria argument caught on is because it seemed to remove the supposed stigma of mental health issues from the Royal Family.

And yet, as Garrard notes, porphyria opened up a different set of problems, because as an hereditable illness, George IV, and indeed other members of the Royal Family, became candidates for diagnosis too.

The research project still continues, but Garrard is already confident of one thing. "The porphyria theory is completely dead in the water. This was a psychiatric illness."

But it certainly did not stop George III from being a successful king. In a prosperous, industrialising Britain, it was growing more important for a monarch to reign rather than rule, providing background stability rather than aggressive leadership.

With his 60-year reign, George III certainly provided continuity, and I believe that his short episodes of illness tend unfairly to diminish our views of him.

Fit To Rule is broadcast on BBC Two on 15 April at 21:00 BST, or catch up with iPlayer

You can follow the Magazine on Twitter and on Facebook