Edinburgh fly-half Nathan Chamberlain converted his own last-gasp try to rescue victory from the jaws of defeat against 14-man Connacht at the Sportsground.
Captain Jarrad Butler's 56th-minute dismissal for a high tackle left Connacht clinging on, but fly-half Chamberlain slalomed through for the killer score which keeps his side in contention for Champions Cup rugby next season.
With first use of a blustery wind, Connacht bookended the first half with tries from academy centre Sean O'Brien – on his first start – and Shane Delahunt to lead 14-5.
Magnus Bradbury touched down for Edinburgh on the half-hour mark and they left it late to punish Connacht. Chamberlain drew them closer with a penalty before using late line-out possession to slip in under the posts.
The Scottish side, whose game last week against Benetton was postponed, came under immediate pressure with Gavin Thornbury, the eventual Guinness player-of-the-match, charging down a Charlie Shiel kick.
The hosts kept pressing and worked the ball wide for 22-year-old centre O'Brien to power over in the fourth minute. Jack Carty converted for a 7-0 lead.
A terrific no-look inside pass from prop Lee-Roy Atalifo saw Edinburgh finally fire in attack. Fellow front-rowers Michael Willemse and Pierre Schoeman gained good ground before Bradbury knocked on.
There was no mistake from the Edinburgh lock in the 31st minute as he finished off some patient round-the-corner driving. Bradbury’s try owed much to a brilliant initial break past halfway from Chamberlain.
However, with tighthead Jack Aungier carrying forcefully, Connacht hit back on the stroke of half-time. Hooker Delahunt crossed from a second maul attempt near the left corner and Carty added a crisp conversion for a 14-5 half-time advantage.
The third quarter developed into a bit of a stalemate, with Edinburgh failing to profit from an advancing maul and the Westerners unable to build on a threatening burst from Alex Wootton.
The game swung massively in Edinburgh’s favour when Butler was dismissed for his head-high tackle on Andrew Davidson, which referee Chris Busby deemed a 'shoulder charge’ with ‘no wrap’.
Eroni Sau surged up inside Connacht 22-metre line, and although the home defence held firm, Chamberlain made it a six-point game with a 69th-minute penalty.
Although a Niall Murray line-out steal edged Connacht closer to the finish line, some costly penalties pinned the Irish province back and Chamberlain exposed some tiring tackling to touch down and add the vital conversion.