Some workhouses can be dated back to the 17th century, but most were established following the 1834 Poor Law Amendment Act (the 'New Poor Law') passed by the Whig government of Earl Grey. Poor Law Unions were formed in each parish in England and Wales, managed by a locally elected Board of Guardians, and administered by the national Poor Law Commission. From the late 1830s to the 1860s, hundreds of new union workhouses were built across the country. The 1834 act was based on the Royal Commission into the Operation of the Poor Laws in 1832; this recommended that poor relief for the unemployed and destitute would not be avaialable outside the workhouse, and life for inmates in workhouse was to be very harsh, to deter the 'able-bodied poor' from applying.