"Sunday school" is the generic name for many different types of religious education pursued on Sundays by various denominations. The first Sunday school may have been that opened in 1751 in St. Mary's Church, Nottingham.
Another early start was made by Hannah Ball, a native of High Wycombe in Buckinghamshire, England, who founded a school within the town in 1769. However the founding of Sunday schools is more commonly associated with the work of Robert Raikes, editor of the Gloucester Journal, who saw the need to prevent children in the slums descending into crime. 1784 was an important year, with many new schools opening, including the interdenominational Stockport Sunday School, which financed and constructed a school for 5000 scholars in 1805; in the late nineteenth century this was accepted as being the largest in the world.
The first Sunday school in London opened at Surrey Chapel under Rowland Hill. By 1831, Sunday schools in Great Britain were attended weekly by 1,250,000 children, approximately 25 percent of the population. They provided basic literacy education alongside religious instruction.
Their work in the industrial cities was increasingly supplemented by ragged schools (charitable provision for the industrial poor), and eventually by publicly funded education under the late nineteenth century school boards. Sunday schools continued alongside such increasing educational provision, and new forms also developed such as the Socialist Sunday Schools movement which began in the United Kingdom in the late 19th century. The American Sunday School system was first begun by Samuel Slater in his textile mills in Pawtucket, Rhode Island, in the 1790's.