Hundreds of passengers faced "shambolic" major disruption at Waverley station in Edinburgh tonight after a series of train cancellations and a breakdown.
Festival-goers trying to get home found themselves packed into trains "like sardines".
ScotRail advised passengers "to make their own travel arrangements" because of overcrowding between Waverley and Haymarket, with limited replacement buses available.
One ScotRail source said: "Absolute carnage in Waverley tonight - I have never seen it as bad.
"I can't keep up with the disruption."
The source said multiple trains were cancelled because of a lack of drivers.
"Hundreds of passengers not able to get on services.
"Police in attendance at almost every train for crowd control."
Scotland on Sunday journalist Dani Garavelli, who was travelling to Glasgow, said: "It's a shambles, and dangerous I reckon.
"I'm on a train now but totally overcrowded.
"Standing like sardines and melting in the heat.
"The Festival happens every year. How hard is it to cater for?
Ms Garavelli said she was awaiting the 11:15pm train but it failed to turn up.
She said: "The platform got more and more overcrowded.
"There were no announcements.
"The train didn't come.
"Then someone heard it wasn't coming, so hundreds rushed up the stairs to try to make the 11:30pm,but there was no way I was going to get on.
"Then a guard shouted the train on platform 14 is going to Glasgow and everyone left ran for that. I'm on that now."
Angry passengers took to social media to vent their frustration.
BBC Newsnight presenter Kirsty Wark sent a series of increasingly anguished tweets to ScotRail:
"What is the problem @ScotRail? Shocking service problems between Edinburgh and Glasgow.
"Please get us some air now @ScotRail or people are going to be ill.
"This is utterly appalling. No information, no apparent care @ScotRail. No water, no air.
"Ok @ScotRail now officially appalling customer service.
"This is getting really nary at Haymarket @ScotRail. Please exert some control."
Another passenger, Gill Wilson tweeted: "Total bedlam at Edinburgh Waverley. The lack of information and platform changes is leading to chaos and overcrowding. It's dangerous and irresponsible."
Lynda Sirel tweeted: "What is going on in Waverley? No one seems to know, trains are cancelled left and right, with hundreds waiting to get to Glasgow."
A ScotRail spokesperson said the problems had been caused by a train fault at Linlithgow and cancellations because of "crew issues".
He said: "It is a very busy times as the last weekend of the Edinburgh Festival and the Scotland v France rugby international at Murrayfield.
"We’re sorry to our customers who have experienced disruption and busy services today.
"We do all that we can to meet demand.
"Every available train we have is out on the network to get our customers where they need to be.
“Customers delayed by 30 minutes or more are encouraged to claim for money back via our Delay Repay Guarantee on our website or mobile app."