Joao Moutinho scored a stunning winner five minutes from time to give Sporting Lisbon a third straight win in Group D of the Europa League, 2-1 at the expense of FK Ventspils.
The Latvians had looked likely to nick a draw when Juris Laizans converted a 65th-minute penalty to cancel out Miguel Veloso's sixth-minute goal direct from a corner.
The result leaves the Portuguese in firm control of the group, while tonight's opponents remain winless.
Liedson Da Silva got things under way in attacking fashion for the away side, unleashing the first attempt on goal after less than a minute but narrowly missing the left-hand post.
Veloso had the opening goal just five minutes later, though, fortuitously curling the ball straight into the net from a corner on the right-hand side.
Liedson continued to press for Sporting but for a second time failed to test the goalkeeper with a snap shot.
Simon Vukcevic wasted the visitors' next chance, shooting tamely after good work from Leandro Grimi on the right.
The hosts were struggling to get any kind of foothold in the game, and only some stout goalkeeping - Aleksandro Kolinko blocking Veloso's strike from the edge of the area - stopped them going further behind.
Kolinko again wedged himself between the ball and his goal when blocking Felipe Caceido's close-range effort.
After 20 minutes Igor Tsigirlash had the home side's first attempt, a poorly-struck effort which sailed wide.
The same player again failed to hit the target when he found space four minutes later - while Kolinko continued to impress at the other end of the pitch, parrying Veloso's strike from 25 yards.
The first 15 minutes of the second half yielded little coherent attacking play, Jevgenijs Kosmacovs and Edgars Gauracs reduced to hopeful punts at goal for Ventspils and Caicedo snatching at a decent chance at the opposite end.
Gauracs won a penalty with 65 minutes on the clock after a nasty-looking challenge by Fernando Abel, leaving Laizans to slot the spot-kick into the bottom left corner.
That looked to be the final word until 85 minutes when Moutinho smashed a memorable effort into the top corner from a wide position 25 yards out.
Teams:
FK Ventspils Kolinko, Chirkin, Mihadjuks, Zamperini,Ndjoumek-Ndeki, Hodel, Kosmacovs (Zigajevs 60),Butriks (Aleksejs Visnjakovs 53), Laizans (Astafjevs 83),Tsigirlash, Gauracs.
Subs Not Used: Chasnowski, Dedov, Eduards Visnjakovs, Solovjovs.
Goals: Laizans 65 pen.
Sporting Rui Patricio, Abel, Tonel, Daniel Carrico, Grimi,Veloso, Joao Moutinho, Fernandez (Angulo 88),Vukcevic (Bruno Pereirinha 63), Caicedo (Postiga 73), Liedson.
Subs Not Used: Tiago, Silva, Carlos Saleiro, Andre Marques.
Booked: Angulo, Liedson.
Goals: Veloso 6, Joao Moutinho 85.
Att: 4,500
Ref: Sascha Kever (Switzerland).