Vaccination was made compulsory in England and Wales in 1853, with 1853 Vaccination Act :
Vaccination against smallpox was one of the first major achievements of modern medicine, stemming from Edward Jenner's experiments in 1796. [...] The reform of the English Poor Law in 1834, followed by the Registration Act of 1836, gave England a basis for a public vaccination service, and in 1840 the first Vaccination Act enabled the new Poor Law guardians to set up public vaccination services, usually through their own Poor Law medical officers. A year later, this service became free.
Vaccination was not compulsory in England until 1853, when the law began to involve the local registrars of births, marriages and deaths. [...] Further legislation in 1867 tried to tighten up the law: to force guardians to provide adequate services, to compel doctors to fill in the certificates efficiently, and, in particular, to make guardians prosecute parents who did not have their infants vaccinated. In spite of all this, there were few prosecutions, many children were not vaccinated, and during the smallpox epidemic in 1871, over 23,000 people died.
As with other aspects of registration, Scotland was slow to follow England, but then tried to improve on the English model. The English Vaccination Act of 1840 could not have been applied to Scotland, which at that time had neither substantial Poor Law authorities, nor registrars. [...] Scotland did finally get a Vaccination Act in 1863.