Hansen, who inherited the reins from ousted fellow Kiwi Graham Henry, was enduring a ten-game losing streak in the lead-up to the 2003 World Cupin Australia when he was told in no uncertain terms he would be jettisoned if that barren run increased to eleven defeats in their next outing.
So bad were the Welsh at that time they had been thumped 43-9 by an understrength England in Cardiff in an August warm-up and it left Hansen in an uncomfortable position heading into the final preparation match versus Scotland.
Explaining a seminal moment in his coaching career, Hansen told walesonline.co.uk: "Oh, I know how close I came (to getting sacked). David Moffett had come to see me and told me if we didn't beat Scotland that I was going home.
"I didn't tell anybody because I didn't see the point putting them under pressure. But I also told him I wouldn't be changing the plan. I had asked for the warm-up matches to be friendlies because we needed to do a series of different things.
Steve Hansen watching the England players warming-up before the Rugby World Cup semi-final match at International Stadium Yokohama. Photo / Mark Mitchell.
"I wanted the players to train hard. We needed the fitness levels, we didn't need the games. But the union didn't want to buy into that, they wanted them to be true internationals. Then we got smoked by England's B team basically.
"We'd had a training week you wouldn't normally have if you were playing a Test at the end of it and it meant we had a tired team that went on the park. We went through a bit of pain in the media and from the supporters over that defeat because it was England.
"Then we got the visit from Dave. He couldn't say it himself. I had to say it for him. I said: 'Ok that's fine, but what you've got to do is work out who you are going to replace me with.' I'm going to stay here and work on how I can get this team to be the team we need it to be."
It was a sliding doors moment in Hansen's coaching career. Instead of being unceremoniously tossed aside on the scrapheap, his Wales team went on to enjoy a positive World Cup, giving England quite a scare in the quarter-finals.
With his reputation now enhanced, he soon returned to New Zealand to become part of Henry's All Blacks coaching ticket which went on to win the 2011 World Cup before Hansen himself took over and repeated the trick at the 2015 finals. Hansen has since moved on to club coaching in Japan.