Pupils could even be excluded from school if they do not follow transport rules
Children who use buses to travel to school are being handed a behaviour code which allows head teachers the power to punish those who misbehave.
Pupils are warned they could even be excluded from school if they do not follow the rules, starting in January.
It aims to improve the behaviour and safety of young people travelling to school or college.
The father of a boy killed in a school bus crash in 2002 said it was a step in the right direction.
The assembly government said schools and local authorities would have the power to take action against young people who misbehaved on their way to and from school or college.
Children will be more aware what they've got to do, teachers will be more aware of their responsibility and bus drivers too
David Cunningham-Jones, father of Stuart, pictured
An awareness campaign will start in January to encourage pupils to behave responsibly and help head teachers, teachers, parents and transport operators to understand their role.
The code, which includes all methods of transport, will be incorporated into schools' existing behaviour policies.
Deputy First Minister and Transport Minister Ieuan Wyn Jones said: "These newly acquired powers have given us an opportunity to produce an all-encompassing code which will cover the various forms of school transport used every week across the nation, from roads to railways, and buses to bicycles.
"Close engagement with children and young people has played a very important part in developing the code - their views and opinions have been listened to, and are reflected as such.
"This code concentrates on positive messages around children and young people's rights, responsibilities and safety when travelling from home to school or college."
Stuart Cunningham-Jones died in a bus crash in the Vale of Glamorgan
David Cunningham-Jones, father of 12-year-old Stuart, who was killed in a school bus crash in the Vale of Glamorgan, welcomed the code but said more work was needed.
He said: "If you go back to the time of the crash, this was all very grey - nobody knew who had responsibility.
"Children will be more aware what they've got to do, teachers will be more aware of their responsibility and bus drivers too."
The jury at Stuart's inquest returned a verdict of accidental death, believing the crash happened because of interference with the steering wheel after the bus driver described how a child grabbed the wheel seconds before the crash.
Stuart's parents have since campaigned for safer buses.
Mr Cunningham-Jones added: "I would like to see Westminster give the powers to change the Transport Act and that would enable the assembly to stipulate the type of buses, the age of buses, the requirement of seatbelts and abolish the 'three-for-two rule' [where three children can sit on a bus seat designated for two people]."
The code states operators and drivers will have a responsibility to report any incidents of bad behaviour.
Mr Jones added: "We appreciate the problems poor behaviour can have on bus drivers.
Head teachers' union NAHT Cymru said it believed the code, along with appropriate training for drivers, could have a positive impact on behaviour and make journeys safer for all.
The union said: "We've supported this from the start. It came out of the campaign for safer school transport after the Vale crash.
"There's been a lot of discussion with interested parties as the policy was developed - a sensible way to do it."
The union said the only disappointment was that the assembly still did not have the power to make seat belts compulsory.
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.