Aberdeen finally found their shooting boots as they came from behind to fend off a Viking raid.
Michael Hector had given the Dons the lead but Viking Stavanger notched either side of half-time before Craig Storie fired the home side level.
A draw was on the cards but super sub Marcus Campanile pounced in the final seconds.
It was a pleasing workout for gaffer Derek McInnes who had seen his Dons draw a blank in their previous three Pittodrie outings. He told the Daily Record: “I’d take three goals at home any week.
“We managed to blood a few youngsters while Andrew Considine and Jonny Hayes came through unscathed.
“Andy has worked hard and I wouldn’t rule him out for the Partick Thistle game.”
This clash was a sideshow for the Offshore Europe oil and gas conference.
With 50,000 business folk in the city it was a chance for the Dons board to shake a few influential hands.
They also handed out free tickets to the locals but despite this Pittodrie was only half-full.
Aberdeen: Langfield (Rogers 46), Murray (McKenna 78), Hector (Rumsby 83), Considine (Campanile 83), Reynolds (Shaughnessy 46), Masson (Hayes 60), Storie (Gibbons 83), Low (O'Neill 78), Pawlett (Shankland 68), Wylde, Vernon (McManus 68)