Connacht’s eight-match unbeaten home record this season was ended by Edinburgh who triumphed 16-13 in very wet and windy conditions at the Sportsground.
With the elements behind them, Connacht needed to be further ahead than 13-7 at half-time. A 37th-minute penalty try - straight after Ben Toolis’ yellow card - cancelled out David Denton’s earlier try, with Miah Nikora kicking the rest of the hosts’ points.
Two penalties from Sam Hidalgo-Clyne erased Connacht’s lead by the 49th minute and the Edinburgh scrum-half slotted the match-winning penalty with 10 minutes left, while Connacht’s Finlay Bealham was in the sin-bin.
It was Edinburgh’s first away victory in the Guinness Pro12 since the opening round in September, and puts them back within reach of the top six.
Much of this weather-beaten encounter was fought out between the forwards, with referee Leighton Hodges having the most influence during a scrappy first quarter.
Denton was caught offside at a ruck but Nikora watched his penalty effort bounce back off the crossbar and it was Edinburgh who opened the scoring 16 minutes in.
A slashing break from Dougie Fife brought the Scots right up to the try-line and the pressure told following a tapped penalty, with Denton burrowing over from close range. Hidalgo-Clyne added the conversion.
Connacht replied within seven minutes, Nikora nailing a left-sided penalty after a half-break from Bundee Aki. The hosts were pinned back by some clever kicking from Hidalgo-Clyne until late in the half when Rodney Ah You and captain John Muldoon spearheaded some strong carries.
Edinburgh openside Hamish Watson was also throwing himself about to good effect but Connacht were quick to capitalise on the sin-binning of Toolis four minutes before the break.
The second-rower was penalised for not rolling away after an Ah You charge and the resulting penalty saw Connacht dominate a five-metre scrum to earn a penalty try which Nikora converted. The New Zealander also tagged on a penalty with the last kick of the half.
However, the visitors opened the second half with two well-struck Hidalgo-Clyne kicks, punishing infringements by props Dennis Buckley and Ah You.
Edinburgh looked the more creative side as a deft kick from Hidalgo-Clyne gave Fife a change to stretch his legs, but the winger knocked on when trying to gather the ball.
Hidalgo-Clyne missed a difficult penalty attempt from the left but the defensive duties for Connacht were taxing, especially as they were camped in their own half for long spells.
With replacement prop Bealham sin-binned for not rolling away, Hidalgo-Clyne drove over an excellent penalty from distance under intense pressure. It proved to be the decisive score in the end as the Scots contained Connacht right to the finish.