A legal limit of 25 pupils for primary one classes has been approved by the Scottish Parliament.
The Scottish government said the move was "an important stepping stone" towards its target of class sizes of 18 or fewer for all pupils in the first three years of primary.
Previous plans to reduce class sizes have failed because schools could not legally say classes were full.
The new class size cap will apply to the 2011-12 academic year.
Until now, each teacher could have up to 30 pupils in their class.
Education Secretary Mike Russell said: "Councils asked us to put a new legal limit in place for P1 class sizes to put them on a more sound footing when considering placing requests from parents.
"Councils supported these regulations unanimously during our consultation and parliament has now given its backing, putting in place across Scotland a legal maximum of 25 pupils in P1."
Mr Russell also said he was "absolutely committed", even in current difficult financial circumstances, to work with councils to deliver further progress on class sizes.
Last month he said progress was being made with council umbrella body Cosla towards having 20% of primary one to three pupils in class sizes of 18 or fewer.
But opposition leaders have accused the SNP government of failing to deliver their manifesto commitment to reduce class sizes to 18.
The Liberal Democrats said they supported the new regulatons.
Lib Dem education spokeswoman Margaret Smith commented: "We believe that good quality teachers are the most important component in delivery of education. However, all teachers will benefit from teaching in smaller class sizes in Primary 1.
"I am concerned at the Scottish government's admission that they will count one classroom of 36 pupils and two teachers as being the same as having two classes of 18 pupils each. That's why I've asked the cabinet secretary to monitor numbers of children in team teaching situations."