By David Stires

(FORTUNE Magazine) – WHEN BEST FRIENDS RICK ROSENFIELD and Larry Flax gave up their successful law firm in 1985 to start California Pizza Kitchen, they made the kind of mistakes you might expect from two attorneys with no experience running a restaurant. In their bid to launch a gourmet pizza chain, they opened their first outlet on the "wrong side" of Beverly Drive in Beverly Hills, where there weren't any other restaurants. And they made their pizzas too fancy, with toppings like lamb and rabbit sausages. Eventually they hit their stride with more accessible dishes such as barbecue chicken pizza. But they were still surprised when, in 1992, Pepsi offered to buy a majority stake in the business for $100 million--a whole lot of dough for a couple of amateurs.

And so began a topsy-turvy time for the pizza chain. In 1997, Pepsi abruptly sold its stake to New York private-equity firm Bruckmann Rosser Sherrill & Co. They retained Rosenfield and Flax as co-chairmen. But to take the company public, the new owners decided they needed a seasoned industry pro. So they relieved the founders of day-to-day management duties in favor of Fred Hipp, a former Houlihan's executive, who was installed as CEO. Rosenfield and Flax, meanwhile, were relegated to lighter fare: public relations, food development--and golf. ("Rick was good at it," says Larry. "I'm a 21 handicap.")

In preparation for an IPO in 2000, Hipp went on an aggressive expansion spree, opening dozens of new restaurants, occasionally in subpar locations. That took a toll on the chain's finances, and sales at newer venues fell substantially below those of older facilities. Hipp issued a profit warning in March 2003 and resigned soon afterwards. "When I came in, it was a mess," says Hipp, defending his tenure. "Our team did a great job taking it to a whole new level."

In crisis mode, the board turned to a pair of executives they knew they could trust: Rosenfield and Flax. Once back on the job as co-CEOs, the founders slammed the brakes on Hipp's initiatives. They halted the expansion, shut down underperforming outlets, and replaced virtually all the top managers. To boost traffic, they set out to "supercharge the brand," as Rosenfield says. They spruced up the restaurants to give them a more upscale feel and rolled out adventurous new dishes such as Bangkok calamari and chipotle chicken ravioli. Today the chain is growing again. Sales at its 171 restaurants jumped 17% last year, to $422 million. The stock has nearly doubled since Rosenfield and Flax returned.

As for the two friends, they're happy again. While they divvy up some responsibilities--Rosenfield, 60, mostly handles finances, while Flax, 63, oversees operations--they're often on the road together scouting out new sites, or in the kitchen working on new dishes. They both say they prefer the 60-hour weeks to the golf course. "This gets our full-time attention," says Rosenfield. "And we love it." -- David Stires