Stephen Myler kicked 16 points as Northampton came from behind to win at Murrayfield and go three points clear at the top of Heineken Cup Pool One.
It was a heartbreaking scoreline for Edinburgh who had played some scintillating rugby in the first half, only to see their lead whittled away as the power of the Northampton pack forced them on to the back foot.
The hosts outscored Northampton three tries to two in an electrifying first half but could only take a 24-21 lead in at the break.
Chris Paterson gave Edinburgh a first-minute lead with a simple penalty but the Northampton pack put down a marker five minutes later when they capitalised on a crafty kick from Myler to the corner.
Chris Day scooped the lineout and the drive on the big lock was unstoppable, with hooker Dylan Hartley the man who came up with the ball for his first Heineken Cup try.
Edinburgh hit back immediately and great hands exposed the Northampton defence down the left for Mike Blair to send prop Alan Jacobsen powering over from 10 metres.
Paterson converted but Myler pegged Edinburgh back with a penalty to make it 10-10.
Then came a spell of magic from the home side as the ball moved swiftly through the hands of both Blairs, Mike and David, Paterson, Ross Ford and Scott MacLeod before Netani Talei went over in the corner for Paterson to convert.
Myler cut the lead to four points with his second penalty before Edinburgh again scored a class try with Mike Blair, James King and Fraser MacKenzie all involved before Ben Cairns scorched over with Northampton running out of tacklers.
Paterson again slotted the conversion but with five minutes of the half to go Myler landed his third penalty, and Northampton found a late try before the half-time whistle sounded.
Number eight Roger Wilson made a break and Phil Dowson put James Downey over for a huge try in the context of the match.
The second half was a more subdued affair, with Edinburgh stretching their lead with a Paterson penalty after 48 minutes.
Chris Ashton had a try ruled out after the video referee ruled he had dropped the ball when scoring, but Northampton registered a legitimate score soon afterwards when Jon Clarke and Greig Tonks put Paul Diggin over.
Myler converted to give Northampton the lead, and then banged over his fourth penalty on the hour mark.
Although Edinburgh tried to recapture some of the magic of the first half, their efforts perished on a solid Northampton defence.
The visitors had the sniff of a vital win on the road and did not let anything through, showing their greater experience as they ran the game down playing a possession game to which Edinburgh had no answer.