Adam Rooney hit a late winner in Latvia as Aberdeen cruised into the third qualifying round of the Europa League.
The Irishman struck the only goal in the 79th minute as Aberdeen secured a 4-0 aggregate victory over Ventspils.
Joe Lewis had saved a first-half penalty for the Dons, who were comfortable throughout the second period. A late flurry of goals Pittodrie had given the Scottish side breathing space and a long-delayed flight to Latvia on the eve of the game - after their plane hit a seagull when landing - failed to upset their rhythm.
Aberdeen did have some first-half scares though, the first coming inside five minutes when a ball across their 18-yard line fell nicely for Ritvars Rugins, but he shot straight at Lewis, who beat the effort away.
Both sides threatened from set-pieces before Rugins again had sight of goal after a switch of play sent him racing down the left, but the Latvia international shot high and wide.
Rooney thought he had opened the scoring in the 32nd minute when he nodded over the line after Ryan Jack had struck the underside of the bar with a first-time strike from 22 yards, but he was rightly flagged offside. Ventspils had the perfect chance to liven up the tie when Ash Taylor's clumsy attempted clearance caught Aleksei Alekseev's boot as the striker controlled a bouncing ball.
But Lewis dived to his right to push away Antons Jemelins' penalty and blocked the follow-up from Alans Sinelnikovs with his foot. Rooney missed a sitter seconds after the restart when Graeme Shinnie headed Niall McGinn's deep cross back across the goalmouth.
The Irishman was not fully prepared and skied over from two yards. Rooney then set up Kenny McLean with a header but the midfielder could not turn the ball back on target after beating a defender to the ball beyond the far post.
McGinn then forced an impressive save from a 25-yard free-kick before Lewis produced a brilliant stop from Simonas Paulius midway through the half.
Any doubts about Aberdeen's progress were wiped out when Rooney drilled home from 18 yards after Jonny Hayes had got past a defender and rolled the ball in front of the advancing forward.
The Dons threatened several more times on the break and Shinnie forced a good double save after bursting through the heart of the Ventspils defence.