Ebullient chief executives are like hen's teeth these days, but nothing is going to wipe the smile off Justin King's face. While most retailers are sloughed in gloom, the Sainsbury's boss is bouncing about like Tigger. A few hours before he again confounded expectations by reporting underlying quarterly sales up an impressive 6.2%. Strip out the impact of Alistair Darling's bungle of lowering the VAT rate in December and the growth is Sainsbury's best for a decade.

Impressive indeed, especially when some City analysts have been forecasting for months that of all the big supermarket chains Sainsbury's is least well placed to weather the recession. Their theory is that it will lose out as consumers trade down to cheaper food stores.

So far, so wrong - and King is clearly frustrated by the opinion that Sainsbury's will eventually be the supermarket to suffer most. "I don't think people are giving us credit for the changes we have made to this business. They are still describing the business as it was in '04, rather than '08."

This week, 2004 is on his mind: it is five years, almost to the day, since he was installed as chief executive. A shiny gold "Sainsbury's 5" pin, like a cross between a child's birthday brooch and a Blue Peter badge, sits on a shelf in his glass-walled office overlooking Holborn Circus. Next week, like all staff who have made it to their fifth anniversary, he will be entitled to wear it and actually seems enthused at the prospect. "Nice, isn't it?" he says, expecting agreement.

He has, in truth, done a much better job than most thought possible. Sainsbury's was seen as a near-basket case when King arrived, from Asda, via a brief stop at Marks & Spencer. Sales and market share were in rapid decline, there were yawning gaps on the shelves and the City had fallen out with the chairman, Sir Peter Davies.

"We had incredible problems," recalls King. "We did four or five profits warnings. I experienced in that first six months what you don't want to experience in a lifetime ... If the downturn had come along in '04, would we have survived it? No.

"The worst thing was the position we had put colleagues in. They were completely disengaged. People two levels down always know what the problems are in a business and what needs to be done. If you don't do it, they think you are mad. All the knowledge we needed was there, but management hadn't been listening."

A customer survey proved the depth of the problem, but also gave encouragement: "Usually you would get 20,000-30,000 replies, but 250,000 people were so annoyed they bothered to write. That confirmed the trouble we were in. But that survey also showed we had a future, because they cared enough to write."

£6m bonus

He hired a new senior management team and set about a sales-led recovery, hitting every target set, earning himself a £6m bonus. This week's sales figures were the 17th consecutive increase in like-for-like sales King has posted.

But it has not been plain sailing. There has been a two-year Competition Commission inquiry, a failed takeover attempt by a Qatari investor (which could have generated millions for King), a resurgent Morrisons and Asda and now what could be the mother of all recessions.

The Competition Commission suggested a tough new code of conduct and an ombudsman to protect suppliers, although King reckons that the idea that companies the size of Nestlé and Unilever need protecting is "risible". A third proposal - for a new test to insist that planners consider the available choice of grocers when granting permission for a new shop - has been kicked into the long grass after Tesco won an appeal to the competition appeals tribunal. King reckons that was wrong and the commission should try again. "I wouldn't think it is difficult to prove that if one operator has 80% market share in one town, then if there is going to be another store it would be a benefit to have a test that can ensure competition."

However, he refuses to be dejected about the economic downturn: "Too many business people focus on the bad, because it helps them explain why their business is performing the way it is. We have a remarkable habit of talking ourselves into a bad place." But not the Sainsbury's boss: "People think I have a sunny disposition," he adds.

King and his lieutenants say they knew "things were going to get tough" and prepared accordingly. Out went the TV adverts showing Jamie Oliver swishing through Italian fields in search of the perfect wheat for pasta. In their place came the Feed Your Family for a Fiver campaign and tips to use up leftovers.

The grocer's Switch and Save campaign, promoting cheaper, own-label goods, was planned a year ago and, luckily, launched just when the economy went haywire. Sales of frozen food and cheap cuts of meat have taken off - even pigs' trotters are back on the shelves - while expensive ready meals have gone into reverse, along with organics. Other retailers call it downtrading, a label King rejects. "Downtrading conjures up an image of buying something worse to save money. You don't wake up one morning as an M&S shopper and decide to go shopping at Aldi. We call it economising, or savvy shopping.

"The phenomenon is nothing new. My mum used to walk the whole high street before buying a thing. She was looking for the best prices and quality."

Man from Mars

Whatever he calls it, Sainsbury's does not seem to be being left behind, and King's success, together with his shirtsleeves style and easy manner, have turned him into something of a media personality. The son of a salesman, King went to Bath University and then joined Mars, the breeding ground of so many senior British bosses. He had spells at Pepsi and Häagen-Dazs before joining the Allan Leighton and Archie Norman school of business in Leeds, also known as Asda.

Unlike most businessmen, he is relaxed posing for the camera. Maybe it's the extra confidence that comes with dropping a few pounds. He has lost nearly a stone, he says, by taking more exercise, mainly running across farmland near his home in Warwickshire. The family collie is his running mate and he can tell he is getting fitter because he's now faster than the dog.

In December, he made his debut on BBC1's Question Time. "We took a conscious decision early on that I had to be visible," he says, but he will only appear when he can "add value and when Sainsbury's has a point of view. When I did Question Time we, as a company, wanted to talk about VAT and the demise of the high street." In the event, he found himself commenting on prostitution.

Another telly project is in production. It remains hush-hush, but is being made by the person who dreamed up The Apprentice and Dragon's Den.

Away from the office - where a signed pair of Dame Kelly Holmes's running shoes share a shelf with his five-year badge - King's passion is sport, and he has recently been appointed Boris Johnson's representative on Locog, the Olympics organising committee. "The Olympics are going to be the single most important event in this country in the next 10 years. The economic downturn might even end with the build-up to the Olympics - it might just haul us out."

He still has big plans for Sainsbury's, starting with more stores and bigger non-food ranges, but there is constant chatter that he could succeed Sir Stuart Rose at M&S. So will he still be at Sainsbury's to pick up his 10-year badge? "Yes, I think so. When I started here I was a young man," he says. "And I am still a young man now." (He is 47.)

"I genuinely don't think about it. I don't think five years ahead in personal terms. I don't have a career plan. I just do what I do as well as I can and take opportunities when the right onecomes along."