Two drivers on busy commuter trains were temporarily blinded when a "reckless" man and a youth shone laser lights into their eyes.
Laser pens emit a laser beam which is harmful at close range
Phillip Pearse, 20, and a 16-year-old youth, who cannot be named, pointed the laser beams at passing trains as they pulled into Newport station, south Wales, threatening the safety of hundreds of passengers.
Drivers Michael Jonah and Timothy Reiffer suffered temporary blindness, but managed to bring their trains safely to a halt.
Cardiff Crown Court was told that the safety of hundreds of commuters was jeopardised and the cost of the disruption was put at £13,000.
He saw two people holding up their arms with red lights coming from them
Prosecutor David Webster said: "The pair were on the platform and both of them had a laser pointing device similar in appearance to a cigarette lighter.
"The device emitted a laser beam capable of causing harm at close range.
"(Driver) Mr Jonah was slowing down to enter the station when suddenly a red light hit his eyes.
"He described seeing a red mist and hit the emergency brakes.
"He saw two people holding up their arms with red lights coming from them."
The drivers suffered temporary blindness
Mr Jonah was treated in hospital for a temporary injury to his tear duct.
Passengers on the Swansea to Paddington First Great Western service and a Crewe to Cardiff Wales and Borders service had to be transferred to other trains.
The pair were arrested at the station but told police they were "just messing about" with the lasers which they had bought from a market stall.
The laser lights were identified by experts as "dangerous" if shone into people's eyes at a distance of less than 25 metres.
Robert Buckland, defending Pearse, said: "He is a man who is not as mature as he ought to be.
"This was a reckless act of stupidity and childish foolery on a busy railway station.
"It resulted in dramatic inconvenience."
Judge Roderick Denyer QC called for tighter controls on the sale of lasers after hearing they do not carry proper safety warnings.
He said: "The expert says these device should not be freely available to members of the public and individuals like you should not have access to these lasers.
"This was an act of reckless idiocy rather than one with deliberate malicious intent."
Pearse and the teenager both admitted two charges of endangering the safety of railway passengers.
Pearse, of Newport, was given six months in a young offenders' institute.
The teenager, of Rogiet, near Newport, was given 140 hours community punishment.