Officially, Kingston Hospital is 161 years old. But its roots could be said to stretch back nearly 800 years, when Kingston's first known hospital was established. This was St Leonard's, set up to deal with the leprosy that was such a scourge in early times.

Presumably, St Leonard's was a modern of its kind, for it was granted Royal Letters of Protection in 1227. But years of poverty and mismanagement took their toll. By 1315, conditions were so bad that the lepers rebelled. Not only did they abscond from the hospital, but they also tore down the buildings and took away the materials.

Kingston's next known hospital appeared some 180 years later, and made medical history as one of the earliest isolation hospitals to be organised by a local authority.

The plague was rampant at the time and the Kingston hospital, built in the fields outside the town, was so successful in curtailing the disease that in 1593 Queen Elizabeth sent a message to the Lord Mayor and Aldermen of London to follow Kingston's good example.

"They pressentlie upon the fyrste infection caused an house to be made in the fields dystante from the towne, where the infected might be kept apart and provided for all things convenient for their sustenance and care which, yf so little a town as Kingstone is able to pereforme, we cannott but thinck that the Cittye of London should cause some fitt lodginge to be made in some conveynent place without the cittye where those that are infected might be kept apart".

This hospital was probably the Pesthouse that existed throughout the 17th century for patients with infectious diseases.

It was at Marshfield, a rural site near the Hogsmill River to the east of what is now Villiers Road, and was demolished in 1703.

There seems to have been no other hospital in Kingston until 1843, when work began on the Union Workhouse Infirmary, which laid the foundation for today's Kingston Hospital.

The workhouse had opened four years previously, following the Poor Law Amendment Act. This decreed that groups of parishes within a 10-mile radius should form into unions', responsible for the relief of the poor.

Kingston Union was formed in 1836, and at once started planning a new workhouse for paupers. However, Kingston had had such an establishment since 1725.

Initially, it was in a rented house, close to the spot now covered by County Hall in Penrhyn Road.

Here, the poor were "set to work in order to introduce among them habits of virtue, sobriety, obedience and industry and labour, prevent an entail of poverty and idleness, and to keep them at work, and from begging about the streets and pilfering."

Later in the 18th century, the workhouse was transferred to a picturesque house in London Road, opposite its junction with Coombe Road a site now occupied by Wickes DIY store. It was still there when the Kingston Union and its board of 21 elected Guardians' took over in 1836.

At its first meeting, the new board decided to appoint a medical officer and a nurse, who received £10 a year, plus board and lodging. But the following year it was decided to take the economical measure of getting pauper inmates to serve as nurses.

The Union represented 13 communities, namely Hampton, Hampton Wick, Teddington, Kingston, Ham, Hook, Long Ditton, Thames Ditton, Esher, East Molesey, Wimbledon and Malden, and it was clear that the old workhouse in London Road was totally inadequate. So, in 1837 the Guardians paid £150 an acre for "Mr Dickens' field" in Coombe Lane for a new workhouse.

Architect W Mason drew up the plans and contractor Samuel Mason undertook to construct the building for £5,548. Meanwhile, Thomas Clack of Tottenam was commissioned to bore for water to a depth of 90ft.

This was the origin of the well which supplied the whole institution with water until 1919.

After many setbacks, the new workhouse finally emerged as a large, neo-Tudor brick building. It had room for 320 paupers, and was handsome enough to be dubbed "the Grand Palace" by the ratepayers of Kingston.

It opened in 1839, but conditions inside belied the grand exterior. Within weeks there was such a crescendo of complaints against the workhouse master and matron, Mr and Mrs William Smith, that a committee was set up to investigate. It found the master was using handcuffs, leg irons and "other irons of confinement" to ill-treat the paupers, while his wife was "wanting in temper and discretion". The Smiths escaped with a reprimand, but were sacked the following year.

An interesting feature of life in the new workhouse was the attention paid to the sick. Hitherto, the authorities had sent an apothecary round the parish to visit the sick poor in their homes, while inmates were often boarded out when ill. For example, 35s (£1.75) was paid to a Mrs Churchill in 1838 for nursing a pauper with smallpox at Coombe Farm.

Now, there was a medical officer, Dr Taylor, to oversee the sick in the workhouse and gradually bring about an increased awareness of health. In 1840, for instance, he prepared a report on Cases of Fever in Kingston and another on The State of Health of the Poor of the Union. He also requested an increase in accommodation for the sick in the workhouse, and a room was set aside for "special medical cases which are unavoidably offensive".

Then, in February 1843, the Poor Law Commissioners approved Kingston Guardians' proposal for "the erection of an infirmary capable of containing 80-100 patients, at any expense not exceeding £l,000."

Nineteen architects submitted schemes and, after much argument, plans by a Mr Fowler were selected. The chosen contractors were Messrs Want and Son, who quoted £849 for the work. But it was fraught with problems. In March 1844, for example, two workmen were sacked for "disgusting conduct" on site.

In April the exasperated Guardians threatened to impose a £10 penalty for each week of delay. Still, the saga dragged on until, on July 19, the Guardians declared that unless the infirmary was ready by July 23, they would terminate the contract and employ their own builders. It was not ready by that date, and the Guardians' minutes for July 30 note that "the contractor has ceased work completely".

The building, constructed of brick with York stone facings, was completed at last in September, the Guardians witholding part of the contractor's fee.

It was a cheerless place. There were no fireplaces, so it was bitterly cold, and the nursing was crude. The new medical officer, Dr Cox, began pleading with the Guardians for stoves, fireplaces, and a professional nurse.

Nothing was done. In 1746 Dr Cox was still requesting a competent nurse for the infirmary, adding that the present ones were "untrusworthy" and "unfit for office". The Guardians relented, and agreed to appoint a paid nurse at an annual salary of £16, plus double food and rations. However, on the appointed interview day, not one candidate turned up.

Keeping a competent nursing staff or any nursing staff at all was a problem for the Kingston Union throughout the 19th century because of low pay, poor living conditions and the hazardous work of dealing with "lunatics and dangerous idiots".

For instance, the unfortunate workhouse nurse in 1840 had to deal with "a pauper female, in a paroxysm of lunacy, who broke a quantity of windows and did other damage, there being no straitwaistcoat or other means of prevention of similar accidents".

The Guardians ordered the purchase of two straitwaistcoats for use "if unavoidably necessary".

By 1897, the year work began on Kingston Union's fine new male infirmary, resignations were so numerous that the Guardians decided they must attract "a better class of nurse". The first step was to increase pay to an annual £33 for charge nurses, £27 for assistant nurses and those attending imbeciles, and £20 for those caring for the infirm. These salaries, it was emphasised, were to include the time-honoured "beer money".

It was also decided to provide a purpose-built nurses' home "where relaxation, quiet and rest can be obtained after the hours of duty". This now vanished building (which in the 1980s and 90s contained the pain control and diabetes units) was completed in 1898 with 31 bedrooms and rooms for reading, sitting and dining.

The medical officers also worked hard for little return. In 1897, the officer for the Malden district complained that his salary had remained at £40 a year since his appointment in 1886, even though the population of his district had nearly doubled, and in the past 12 months he had made l,497 visits and supplied l,298 medicines.

Meanwhile, Dr James Donald, the medical officer at the workhouse, said he got the same salary as had his predecessor 40 years earlier. Yet in that time beds had increased from 50 to 300.