Laura Mongan became the first woman to train a St Leger winner after Harbour Law won a pulsating contest at Doncaster.
The 22/1 shot stayed on stoutly to pass the 14/1 runner-up Ventura Storm and 7/1 third Housesofparliament in the closing stages.
The race was not without drama though as the 4/6 favourite, Idaho, unseated his jockey Seamie Heffernan halfway down the home straight after stumbling when travelling powerfully behind the leaders.
Today is just a sweet, sweet result - George Baker
The victory also gave jockey George Baker his first Classic success. Baker had been been denied two big prizes yesterday at Doncaster.
He was beaten a nose on Quest For More in the 250th Doncaster Cup (by Sheikhzayedroad) and also by length and a quarter on Seamour in the Ladbrokes Mallard Handicap (by Wall Of Fire).
"I can't believe that," he said. "I am so happy for Laura and Ian (Mongan - former jockey and Laura's husband) because they have had so much belief in him.
"They have done everything right - they have given him plenty of time between his races and it has 110% paid dividends for them.
"It's an amazing feeling. It was a hard day yesterday and I find that you have to get over it, work out if you think you can make any improvement and get on with it.
"Today is just a sweet, sweet result. I worked him at Kempton about two weeks ago and he felt brilliant. I kind of felt that we all had Idaho to beat and, when they had that incident, it made it a very open race."