One of six players involved in a play-off for the last of 17 spots up for grabs in the Scottish Regional Qualifier, Hansen, a former national order of merit winner in his homeland, missed a 15-foot birdie putt at the second extra hole and then watched Aberdonian Scott Henderson hole from slightly closer to go through to next week's local final qualifying.
"It would have been a dream come true to play in the British Open at St Andrews," said Hansen after carding a level-par 71 on a Monktonhall course in magnificent condition for the end of its five-year stint as hosting the event.
For Henderson, his success was the reward for a long and agonising wait. Out in the first of 40 groups at 7am, the former European Tour Rookie of the Year was there for 6am and then had to wait nearly nine hours to discover if his effort was going to be good enough.
"I didn't think 71 would give me a ghost of a chance and it was my own fault that I had to wait so long to find out – that was my punishment," said the 40-year-old former Tartan Tour No1.
Stewart Whiteford, brother of European Tour player Peter, Scott Henry, Steve Rennie and Graeme Lornie were the other players involved in the play-off, with Lornie seeing his eight-foot putt to secure the spot at the first hole stop an inch short.
Archerfield's Lee Harper, who was returning to the course where he played as a junior, and Hayston professional Stephen Gray shared top spot with five-under-par 66s, one less than former Scottish amateur champion John Gallagher.
Barry Hume, who has played in two Opens in the last six years, is on course again after a flawless 68, but no-one was happier to pass the test than Zhiqun Lam, a 21-year-old Singaporean who birdied the last two holes for his 69. "Playing in the British Open has been my dream since I started to play golf – and to do that at St Andrews would be something special," he said.
James Hendrick, an amateur from Pollok in Glasgow, was disqualified after signing for the wrong score at the 14th, an error that cost him a place in the play-off.
Mark Kerr of Marriott Dalmahoy qualified for the second year in a row at Goswick, where he shot a one-under-par 71. "I woke up today in Scotland, played golf in England then ended the day in Ireland (where he is playing in a EuroPro Tour event this week]," said Kerr.