The earliest factories (or mills) had grown up in the later 18th century around the expanding cotton industry in Lancashire. Conditions of work were grim and factory owners often imposed excessively long hours on their workforces.
Much of the labour was provided by 'pauper apprentices', who were often children below the age of ten. Many of them were orphans sent into factory employment by the Poor Law authorities, often very far from their home parishes.
In 1800 some 20,000 apprentices were employed in cotton mills. In the next decade as many as a fifth of workers in the cotton industry were children under the age of 13.
In 1802 the Health and Morals of Apprentices Act was passed, the very first piece of factory legislation. Its promoter was Sir Robert Peel, an MP (and father of the future prime minister) who himself was a wealthy factory owner. He was concerned to see that humane standards of treatment were established for the the increasing numbers of 'pauper apprentices' employed in factories like his own.
Peel's Act applied to all apprentices up to the age of 21. It prevented apprentices working at night and for longer than 12 hours a day, and made provision for them to receive some basic education.
The Act's chief weakness, however, was the lack of any means to enforce it. Although 'visitors' (usually a local Justice of the Peace and clergyman) were appointed to inspect factories in their area, they were often acquaintances of the owners.
In 1815, Peel, supported by Robert Owen, the progressive owner of the New Lanark Mill on the River Clyde, attempted unsuccessfully to bring in legislation to ban children under the age of ten from any employment. He continued to campaign inside and outside Parliament, and a parliamentary inquiry into child labour in factories, led to the passing of the Cotton Mills Act of 1819.
The Act required that no child under the age of nine was to be employed in cotton mills, with a maximum day of 12 hours for all those under 16. But once again the means of enforcing such legislation remained a serious problem.