The Rovers defender played a pivotal role in the winning goal, as Gordon Strachan’s side moved off the foot of their World Cup qualifying group.
Ikechi Anya had opened the scoring on 59 minutes, before Jovan Kostovski equalised late on.
But in the closing stages, Hanley made a trademark lung-busting run from inside his own half, before slipping the ball to James McArthur, who was fouled, and Shaun Maloney curled home the resulting free-kick.
In Oslo, Josh King again looked lively, but carbon-copy goals from Fabian Schär at the start of each half saw Switzerland beat Norway 2-0.
The Rovers winger was introduced midway through the first half and twice went close before the break – heading wide before forcing a good save from Diego Benaglio.
The defeat leaves Norway fourth in Group E and in a closely-contested battle to reach Brazil via the play-offs.
Corry Evans was an unused substitute as Northern Ireland slumped to a 3-2 defeat away to lowly Luxembourg.