Edinburgh scored three tries in the last eight minutes to add a bonus point to their home victory over Connacht.
Reliable kicking from returning Edinburgh captain Greig Laidlaw laced a game that Connacht had been leading 10-3 after Robbie Henshaw's early try.
Dougie Fife started the comeback right on half-time then Cornell du Preez touched down after 72 minutes.
And Nick de Luca flew in to score a third before WP Nel's try gave Edinburgh the bonus with seconds left.
The late surge from the hosts at Murrayfield probably made the win look more comfortable than it was, with Edinburgh failing to go up a gear in their play until the last quarter.
However, Alan Solomons' men will just be glad to move eighth in the Pro12 and recover from last weekend's loss to Ulster.
Bottom-side Connacht, who looked promising in the opening exchanges, were hampered by two Dan Parks penalties that hit the post when the score was tight.
An early lineout had the visitors driving towards the line and thinking they had crossed it, but the lack of a television match official scuppered their claims.
Laidlaw kicked well to register the first points of the game, although former Scotland stand-off Parks levelled matters with a drop goal before Connacht touched down the opening try.
Poor distribution from an Edinburgh lineout meant the hosts were caught out, Connacht spilling forward and Ireland full-back Henshaw finishing off a great passing move to run in at the corner.
Parks added the conversion, but Edinburgh reduced the deficit through Laidlaw's second penalty from 30 metres after the Galway side handled in the ruck.
Ross Rennie, making his first start in eight months following shoulder surgery, pleased the Murrayfield crowd by making a dash to the try-line that was crucially intercepted.
So no try for Edinburgh, but Laidlaw's third with the boot in front of the posts brought them back to within a point of the Irish side.
Connacht nearly pulled away again when Edinburgh's Jack Cuthbert came round the side, cynically conceding the penalty that Parks kicked off the post from the 22-metre line.
Eager for a half-time lead, sustained Edinburgh pressure and good composure led to Fife bursting through to cross over just before the whistle.
Referee Leighton Hodges was well placed to see the winger touch down and Laidlaw reliably kicked the conversion.
Laidlaw did the business with a penalty once more to give Edinburgh a more comfortable lead, which stayed that way when another Parks penalty bounced off the upright.
Pat Lam's side were made to rue his bad luck further when Laidlaw made it five successful penalties out of five minutes later.
Du Preez powered over on the overlap with Edinburgh's second try to ensure the victory, with Laidlaw converting there as he did from the subsequent two-try flurry.
De Luca intercepted brilliantly and touched down after the visitors tried to play out from deep, before Nel's dash from the 22 metre line put the icing on the cake.