The Scottish government has published legislation guaranteeing 600 hours of free nursery care for three- and four-year-olds six years after the SNP's pledge in its 2007 manifesto.
The children and young people bill, unveiled last week, will also allow looked-after children to turn to local authorities for help and financial support up to the age of 25; enable the children's commissioner to represent individual children; and increase protection for vulnerable young people by requiring health boards and councils to appoint named workers to support them.
Announcing the bill, minister for children and young people Aileen Campbell said that it would improve levels of care and support for children and families across the country.
But critics - including a leading children's charity - said the bill did not go far enough. In England and Wales, thousands of two-year-olds from the poorest families will be entitled to free childcare, but the Scottish bill provides only for looked-after two-year-olds.
Jackie Brock, chief executive of Children in Scotland, welcomed the bill but said there were "significant gaps" in supporting improvement for all vulnerable pre-school children and children with additional support needs.
According to the Liberal Democrats, between now and the independence referendum in 2014, 50,000 two-year-olds in Scotland will miss out on support that will be available south of the border.
Neil Bibby, Labour's shadow minister for children and young people, called on the Scottish government to ensure that the additional nursery hours were fully funded.
According to Cosla, the local authorities umbrella body, an agreement has been reached on how the 600 hours, expected to start in April next year, will be funded and implemented.
But Douglas Chapman, Cosla's spokesman for education, children and young people, said: "No Scottish government of any political persuasion can know how much money will be available in future spending reviews."