Tabling an amendment to the education Bill on Tuesday, Peter Peacock, Deputy Children and Education Minister, outlined three exceptions to the rule but stressed that none was to be seen as encouraging authorities or schools to opt out of the provisions.
Mainstream education is to be the norm except where it would not suit the child, would be incompatible with the "efficient education" of other children or would incur "significant public expenditure" which would not otherwise be the case.
Mr Peacock said he envisaged these would be very exceptional circumstances but they were an attempt to recognise the "extraordinarily complex and sensitive issues", allowing councils to consider alternatives. Parents would still have the right to make a placing request to another mainstream school or a special school.
Mary Mulligan, who chairs the Parliament's education committee, underlined the difficulty of assessing the effects on other children and also sought a definition of "significant" public expenditure, as did Nicola Sturgeon, the SNP's spokesperson. Mr Peacock said the intention was to send a clear signal to the special educational needs community but also to free local authorities and individual schools to weigh up the various competing demands in "the best interests of the child".
He added that authorities would have to be the arbitrators of the financial implications. The Executive has already promised pound;12 million towards the costs of integrating pupils in mainstream schools and another pound;5 million for training teachers. Mr Peacock told the committee that over time he also envisaged a transfer of resources from special schools.
In other moves at the committee, Mr Peacock announced the setting up of a working party to consider how best to ensure children have two full years of pre-school education. The group will include representatives from the Executive, the local authorities and parents.
Concerns had been raised about three and four-year-olds who missed out on a term or more because of their birth dates. Mr Peacock acknowledged the anomalous result that "the youngest and arguably less mature youngsters get less pre-schooling than older and possibly more matre children".
But he said the issues were highly complex and, since their resolution would not require primary legislation, they should be examined in detail.
Mr Peacock also pointed out that local authorities are not penalised where parents put back their children's school starting date. Resources for the pre-school education of three and four-year-olds are provided in a separate grant from the main local government allocation, although ministers plan to bring the two together so there will be more flexibility in funding. In the meantime, Mr Peacock said the authorities had pound;22 million to support "deferred entry" places.
In another pledge, the Executive is to initiate consultations on home education. Mr Peacock said guidance would then be issued to education authorities but he stressed that it was important not to undermine the legal requirement for school attendance.
Ms Sturgeon criticised the unclear and bureaucratic Scottish approach to home education which requires the consent of the education authority, in contrast to England where parents simply have to notify the authority that they are withdrawing their child from school which puts the onus on the authority to mount a swift investigation.
There was near unanimity over the abolition of opted-out schools and legal rights for parents on sex education, with Brian Monteith, the Tories' education spokesperson, a lone voice on each issue.
To allay fears fanned by the "Section 28" controversy, Mr Monteith pressed for parents to be given a statutory right to withdraw children from "any discussion of sexuality in any school".
Michael Russell, SNP, said this was "superficially attractive" but would require the whole curriculum to be amended, from works of literature to "male and female plugs in electronics".
Mr Monteith also argued without success for guidance on sex education to stress "the primacy of marriage" and for school boards to be allowed to veto all sex education material.
Mr Peacock said that the proposed amendments would impose so many restrictions on what is taught in schools that they pointed in the direction of a national curriculum.
Mr Monteith's proposals could encourage parents to stand for election to school boards for narrow, sectional reasons. They also betrayed mistrust in the professionalism of heads and teachers.