Aberdeen were made to battle for their place in the quarter-finals of the Viaplay Cup as they warmed up for their Europa League encounter against Hacken with a narrow 2-1 victory at Stirling.
Bojan Miovski fired the Dons into the lead after 29 minutes and a second from Leighton Clarkson just after the hour mark looked to have broken the resistance of their League One hosts.
The part-timers, who had hammered St Johnstone 4-0 in the group stage, set up a grandstand finish when Greig Spence pulled one back with 16 minutes left on the clock.
But the Premiership visitors withstood the late pressure to record a first competitive victory of the campaign ahead of their trip to Sweden to face Hacken on Thursday night for their play-off first-leg.
Aberdeen showed Stirling respect by selecting the same side that pushed Celtic hard in last Sunday’s 3-1 league defeat at Pittodrie.
And they opened in determined fashion as they sought an early breakthrough.
They almost had it after just five minutes but Stirling goalkeeper Blair Currie touched Duk’s header onto the crossbar and over from a Clarkson corner.
Only a minute later, Shayden Morris utilised his blistering pace to work a give-and-go on the right side of the box but his low centre just evaded the outstretched leg of Duk.
Stirling were resolute in defence and briefly flickered into life in attack but Currie had to look smart again in the 19th minute to clutch a Miovski header.
But there was nothing the home stopper could do just short of the half-hour mark as Aberdeen took the lead.
Nicky Devlin, who began on the right of a three-man defence, looked more comfortable when asked the fill the right-back slot and he was the creator.
The summer signing from Livingston took a pass in his stride and burst forward in determined fashion before reaching the by-line.
His cutback was tamed by Miovski, who took his time before drilling the ball into the net from 10 yards out.
Currie was called into action again in the 36th minute as Dante Polvara darted forward beyond the Stirling midfield and played in Morris.
But the winger’s shot was repelled by the Albion number one.
After a half of trying to keep the Aberdeen attacks at bay, Stirling suddenly threatened at the other end.
Kieran Moore helped a counter-attack on to the lurking Dale Carrick but the experienced striker’s shot was blocked by Kelle Roos in the Dons goal.
The home side were buoyed by the way they finished the first half and were re-energised after the break.
A Jack Leitch in-swinging corner caused havoc before being scrambled clear by the Aberdeen defence and then Carrick almost burst clear but could not get a shot away.
However, the away side settled and doubled their lead after 62 minutes with a stunner from Clarkson.
Currie did brilliantly to beat away a fierce shot from Graeme Shinnie but Clarkson thundered the rebound into the net via the underside of the crossbar.
Only the woodwork denied Duk a third for Aberdeen from Clarkson’s corner before Stirling pulled one back in the 74th minute.
Ross Davidson’s deep free-kick was nodded back into the danger area by skipper Paul McLean and substitute Spence glanced his header into the net from close range.
Stirling hurled balls forward at every opportunity and screamed for a penalty at the death when Davidson was wiped out after shooting over.
But referee David Munro was not impressed and time eventually ran out on the stubborn hosts.