One of the thrill-seekers, who appears to be in his early teens, was photographed by a shocked tram passenger who said the pair high-fived as they rode for at least two stops through the city centre.
The picture is the first photographic evidence of “tram surfing” on Edinburgh’s network, which is just a month away from celebrating its first anniversary.
Eyewitness Charlie James, who took the photo of the hitchhiker, boarded the westbound service at Princes Street at around 4.30pm yesterday.
She said: “He and his friend were on the outside of the tram as it pulled into the Princes Street stop, they got off and high-fived each other. Then once I was on the tram and it started moving off, he got back on but his friend didn’t.
“As we were moving, a ticket inspector came along and was on the phone to control. She was saying the police had been informed as well.
“Once the tram reached Shandwick Place he got off and the inspector told him the police had been called.
“He said he’d just missed getting on at the last stop and walked away.”
The shocked passenger added: “I thought it was completely idiotic. They clearly thought they were cool and funny but it was stupid.”
Transport bosses in Manchester were forced to adapt their carriages in 2000 after teens were seen clinging to the outside of moving trams, with a narrow metal ledge on doors being removed.
Hundreds of people are killed each year in countries such as Brazil, Russia and India clinging to trains, either by being hit or falling off, or by being electrocuted by high-voltage wires.
It is believed that tram surfers in Edinburgh are making use of the same thin strip of metal as a toe hold, as well as clinging to the edges of doors.
Community safety leader Councillor Cammy Day said the children’s parents should “take action” to discipline their kids, and said he would raise the issue with tram chiefs.
Cllr Day said: “It’s stupid and it’s dangerous, and I’ll be arranging to meet the tram people to see what we can do to stop this from happening again.
“I hope that their parents take some action against them as well, because they could end up being injured or killed and that’s something we don’t want happening on our tram system.”
A spokesman for Edinburgh Trams urged passengers to report tram-surfing incidents to staff, and said: “This behaviour is rare but it’s extremely stupid and dangerous – as well as himself, he’s putting other road users at risk. We always call police on 999 when we see this happening.”