WP Nel's try 14 minutes from time gave Edinburgh a 21-18 away victory over Saracens in the Challenge Cup.
Alex Goode's early try was cancelled out by Ramiro Moyano's 22nd-minute score, but Andy Christie crossed for Sarries soon after to reduce the deficit to a point at the interval.
Manu Vunipola kicked two second-half penalties to one from Emiliano Boffelli as the hosts led after an hour.
But with Eroni Mawi in the sin-bin the Scots took advantage for Nel's winner.
Saracens thought they had scored a try late in the game to seal victory, but television replays showed an infringement in the build-up and Edinburgh came away with the win.
The loss was Saracens' first European game since they were relegated from the Premiership in 2020 following salary cap breaches.
The defeat may prove costly for Saracens as England number eight Billy Vunipola was forced off after falling awkwardly midway through the first half, while hooker Kapeli Pifeleti was stretchered off a few minutes later.
Saracens: Goode (capt); Lewington, Daly, Lozowski, Malins; Manu Vunipola, Van Zyl; Mako Vunipola, Pifeleti, Clarey, Isiekwe, Hunter-Hill, Christie, Earl, B Vunipola.
Replacements: Lewis, Mawi, Beaton, Swinson, Wray, Davies, Tompkins, Obatoyinbo.
Edinburgh: Boffelli; Blain, Bennett, Lang, Moyano; Savala, Vellacott; Schoeman, McInally, Nel, Sykes, Gilchrist, Crosbie, Watson, Haining.
Replacements: Cherry, Venter, Atalifo, Hodgson, Bradbury, Pyrgos, Van der Walt, Hutchison.
Referee: Tual Trainini (Fra).