Tidal Bay came through in the final strides to land a thrilling win in the Lexus Chase at Leopardstown.
In his first start outside the UK, the 11-year-old (9-2) came from way back to beat First Lieutenant into second by a head.
It also gave trainer Paul Nicholls his third win in the race.
The 5-4 favourite Flemenstar, who had won his last seven starts, struggled in the closing stages and was third, just ahead of Sir Des Champs.
Previous Lexus Chase winners
- 2011: Synchronised (Tony McCoy - Jonjo O'Neill)
- 2010: Pandorama (Paul Carberry - Noel Meade)
- 2009: What A Friend (Sam Thomas - Paul Nicholls)
- 2008: Exotic Dancer (Tony McCoy - Jonjo O'Neill)
- 2007: Denman (Ruby Walsh - Paul Nicholls)
- 2006: The Listener (Daryl Jacob - Robert Alner)
Flemenstar landed over the last in front but he failed to find anything extra on the soft ground on the run to the line at the end of the three-mile distance.
Tidal Bay still had a few lengths to find but he found what was necessary as jockey Ruby Walsh seized on a gap to get into a challenging position.
Walsh said: "He jumped the second-last well and I got through the gap going to the last. He was really finishing and I thought I had a chance of getting to them.
"He was a bit flat-footed at the last and he took time to pick up, but when he did he started to fly and I guess 100 yards down I was thinking I was going to get there.
"Everyone was in the same boat. We all knew Flemenstar's stamina had to be tested and Midnight Chase went a good honest gallop and the tempo was upped all the way. It was a real true-run contest.
"He's a different horse this year. He won at Wetherby, was second in the Hennessy at Newbury and has come and won today. It's brilliant."
Tidal Bay's last start had seen him finish a close second to Cheltenham Gold Cup favourite Bobs Worth at Newbury and Friday's win sees Bobs Worth odds for success in March's big race trimmed from around 4-1 to 3-1.
Flemenstar could be aimed at the Ryanair Chase at the Festival, which is run over two miles and five furlongs, rather than the three-mile challenge of the Gold Cup.