Having previously appeared for the under-23 side, Hansen made his full debut for Scotland on 19 May 1979 in a British Home Championship match against Wales in front of 20,000 spectators at Ninian Park, Cardiff. Scotland manager Jock Stein gave debuts to four Scottish players that day – George Burley, John Wark, Paul Hegarty and Hansen. Hosts Wales won the match 3–0 against a somewhat inexperienced Scottish line-up, with striker John Toshack scoring a hat-trick for Wales.
Hansen's second Scotland cap came the following month on 2 June 1979 in a prestigious Saturday afternoon friendly match at Glasgow's Hampden Park against reigning World Champions Argentina. On the hottest day in Glasgow for 30 years, the 61,000 sun-drenched crowd at Hampden Park saw the South Americans beat Scotland 3–1, with an 18-year-old Diego Maradona scoring his first international goal for Argentina in a virtuoso display of skill and trickery. In an interview in 2007, Hansen said that Maradona was "without a shadow of a doubt the best player I came up against. He was virtually unplayable – even at 18."