Emmanuel Mayuka's last-gasp winner gave BSC Young Boys the edge going into next week's UEFA Europa League round of 32 second leg at FC Zenit St Petersburg.
Zenit's early enterprise was rewarded when Nicolas Lombaerts headed in Danko Lazović's cross midway through the first half but Vladimir Petković's side were back level within 60 seconds of the restart thanks to Senad Lulić's fine solo effort. With Vladimir Bystrov's red card leaving Zenit a man short the match was veering towards stalemate when, four minutes into added time, substitute Mayuka gave YB a priceless advantage.
The Russian champions began with real hunger and signalled their intent in the 19th minute when Roman Shirokov picked out Aleksandr Kerzhakov with a perfect through ball. The 28-year-old's effort was pushed around the post by Marco Wölfli but the goalkeeper could do nothing from the resulting corner.
He was among the minority to spot the set piece being played short, allowing Lazović to collect and arrow in a cross that Belgian international Lombaerts powered home. Lazović came off just before half-time after a knock and his replacement, Bystrov, was soon booked for a challenge on Thierry Doubai.
Petković's half-time words worked a treat, as they burst out of the blocks after the restart, levelling in the first minute of the second half. Lulić battled hard to win the ball outside the Zenit box and, with a good deal of work to do, evaded Bruno Alves' challenge before lofting a beautiful finish over Vyacheslav Malafeev.
Luciano Spalletti's side suffered a further setback when Bystrov was given his marching orders for a second bookable offence after holding back Ammar Jemal and deep into added time it got worse. Also suspended for the second leg, Alain Nef surged forward from centre-back and eventually worked the ball for Mayuka, who adeptly turned Bruno Alves and fired low into the far corner.