(Fortune magazine) -- On July 1, A.G. Lafley woke up at 6 a.m., worked out, showered, and headed to the office in downtown Cincinnati, just as he had for nearly a decade. But this was the
first morning in more than 3,000 days that he was no longer the chief executive of Procter & Gamble.

He walked through the main entrance, passed by the café in the lobby, pressed his key card against the metal scanner, and ... nothing. Lafley felt a momentary shiver. He'd stepped
down as CEO the night before, turning the reins over to longtime P&G-er Robert "Bob" McDonald, 56, but he still had a job as an active chairman -- didn't he?

It turned out to be just a technology glitch, but once Lafley, 62, talked his way inside, he went not to the 11th floor -- an open-air suite of offices he had created to encourage more
interaction among the top executive team -- but instead to the second floor, into a musty, oak-paneled office that was a vestige of the pre-Lafley P&G.

The previous evening he had unobtrusively moved his belongings downstairs. It was a symbolic gesture, but an important one: Lafley wanted to be sure that on day one, McDonald could walk
in and sit at the CEO's desk.

A few days later, at the Global Leadership Council meeting (a weekly session for the top 42 execs), Lafley arrived early and chose a chair far from the one he'd sat in for the past
decade. He was now a supporting cast member, and his physical location underscored the point: All eyes, he says, turned to McDonald as soon as he sat down. "It felt exactly like it was
intended to," he told me later. "The king is dead. Long live the king!"

It is something strange in this era of failed leadership, abysmal succession planning, and dueling egos: a transition atop one of the world's largest and most successful companies that is
notable for what's gone right.

Like just a handful of other companies, including PepsiCo (PEP, Fortune 500) and General Electric (GE, Fortune 500), P&G (PG, Fortune 500) has seen its ability to groom top talent as a competitive advantage --
as much of one as its trademark on Tide or patent on Pampers. Although the company is 172 years old, it has had only 12 chief executives, all insiders, and among them two family members.

Most companies that take succession seriously shroud their process in secrecy. Some, such as GE under Jack Welch, publicize the horse race itself, believing that it will spur the
candidates to work harder. Others, such as Bank of America (BAC, Fortune 500), whose board was forced to convene an "emergency succession committee"
when CEO Ken Lewis said he was leaving, seem to deal with it only under duress.

But now that P&G's transition is complete, the company has allowed Fortune a rare look inside the process, unveiling everything from the top-secret blue binder that tracks every
high-level prospect, to a whirlwind tour of Moscow with McDonald, to the board's deliberations. The result is an unusual picture of a company where leadership development and succession
planning permeate not just the corner office but the entire company.

P&G's openness is particularly surprising because the hand-over comes at a precarious time. Yes, in his near decade as CEO, Lafley transformed P&G from an unfocused collection of
famous brands into an innovation machine that got most of its ideas not from the eggheads in R&D but rather from the consumer.

With his relaxed demeanor, Lafley projected an image antithetical to the charismatic command-and-control CEO so in vogue in his time. And with huge acquisitions, including the $57 billion
deal for Gillette, he gave P&G a global reach that goes beyond most governments.

Yet the company has fared worse than others in the massive market meltdown, in part because of the decision, despite $4 billion in negative currency fluctuations, to stick to its
relatively high pricing while competitors cut theirs.

And Lafley had pushed hard to introduce premium-priced products such as high-end versions of Tide and Bounty, which worked in a boom but not so well in a bust. In the past two years the
stock has lagged behind rivals such as Colgate-Palmolive (CL, Fortune 500), falling 14% compared with Colgate's 6% rise.

While the timing may not be ideal, what Lafley and McDonald have going for them is a bond that is very hard to find in corporate America. In a joint interview they finish each other's
sentences, rip each other about the military, and say things like, "Remember that time we were together in the Egyptian delta?"

Lafley is still working at the company as executive chairman, speaking at least weekly with McDonald, chairing the board, and offering advice. That might be threatening to some new
bosses, but not McDonald. "A.G. is a giant," he says. "And I'm thrilled to stand on his shoulders."

A rocky start

The two first met 29 years ago at a beer garden in Cincinnati, when Lafley, a 33-year-old brand manager for Dawn and former Navy officer, was asked to help recruit a hotshot Army Ranger
named Bob McDonald. The two men hit it off, but midway through their meal McDonald became annoyed when he noticed a bunch of P&G-ers getting rowdy at the other end of the room. It was
the values of the company that had attracted him to the place, but he was getting a distinct frat-boy vibe.

"I almost left that dinner," says McDonald. "I was outraged." (This is a guy who fired his own platoon sergeant for faking a parachute jump.) But Lafley, legendary even then for his
ability to inspire, convinced McDonald that those folks were not representative of P&G.

It helps that grooming talent is in Lafley's DNA -- his father, Alan Lafley, was an HR executive at GE who specialized in succession (and a man who Lafley says Jack Welch once told him
was the "only honest son of a bitch at corporate"). But his motivations go deeper.

"I'm an accidental CEO," Lafley says. With no warning, Lafley received a call from ex-CEO John Pepper on June 6, 2000, telling him that CEO Durk Jager had been ousted and asking him to
step in. "My transition was arguably the poorest in the history of this company," he says.

Although Lafley adapted and thrived, on his office wall he kept a screen shot of himself during his first CNBC interview, staring wide-eyed into the abyss, as a reminder of just how tough
it was. He didn't want anyone else to ever have to go through that chaos.

Top secret talent rankings

I am sitting in the office of Moheet Nagrath, P&G's global human resources officer, which -- for those who enjoy office Kremlinology -- is directly next to that of the CEO.

We are looking at a blue binder that would probably be worth millions on the open market. Called the Talent Portfolio, it contains the names of P&G's up-and-coming leaders, compared
against one another over the past six years in both financial performance and the ability to lead and help others do the same.

"Today I could show you the next generation of successors to current leaders, the generation after that, and the generation after that," says Nagrath. Those at the upper-left-hand side of
one particular page are the people who have consistently outperformed. The people at the lower right are considered "at risk."

There are also lists of who is ready to be promoted next, who will be ready after the current assignment, and who will need more time. There are at least three possible candidates for
each major job -- bench strength most companies would kill for.

Most of those who reach general manager status -- 120 of P&G's 135,000 employees -- are part of this leadership bible. Although the process that culminates in the blue binder has been
decades in the making -- way back in 1947, CEO Richard "Red" Deupree said, "If you leave us our buildings and our brands but take away our people, the company will fail" -- the system in
its current format dates from 2001. That's when Lafley, less than two years into his tenure, began to look forward and asked the question, "Are we hiring the right people?"

Today all executives who become general managers are evaluated every six months with what is called a GM Performance Scorecard. It is a two-page document, with one page of relevant
financial measures and a second, equally important, assessing leadership and team-building abilities.

All managers are reviewed not only by their bosses but also by lateral managers who have worked with them, as well as their own direct reports. All this sharing isn't for everyone. "We're
perfect for Derek Jeter," says Lafley, "but A-Rod would not work out here."

Lafley also focused on succession at the CEO level. Every February one entire board meeting is devoted to reviewing the high-level executives, with the goal of coming up with at least
three potential candidates for each of the top 35 to 40 jobs.

In the early part of the decade the list of Lafley's potential replacements was eight to 10 people, but it was whittled down as time went on. Up-and-comers are regularly asked to make
presentations to the board, and directors also take an annual trip abroad, hosted by top candidates.

"It is a much more focused process than in many companies," says James McNerney, CEO of Boeing and head of the board's compensation and leadership-development committee.

Lafley and the board, along with Bill Conaty, the longtime head of HR at GE, whom Lafley hired as a consultant in 2008, also developed a 10-point list of qualities that a new CEO needed
to possess.

Among them: integrity, character, and values, which Lafley felt had to be beyond perfect to merit consideration. Another list covered the kinds of skills that would be needed in the next
decade. "What you're trying to do is select the candidate that is right for the time," Lafley says.

A company a lot like the military

It is out of this system that Bob McDonald emerged. A son of an adman from suburban Chicago, McDonald was a clean-cut football player and wrestler who first applied to West Point when he
was just 11 (he was told, gently, by his then congressman, former Secretary of Defense Donald Rumsfeld, to wait).

At West Point, McDonald graduated 22nd in his class as an engineering major, but rather than reporting to the Army Corps of Engineers, he decided to join the infantry, something officers
trained at West Point just don't do.

"I figured -- and this is the story of my life, really," he says, "if you're gonna be in the Army, go into the infantry. If you're going to be in marketing, work for P&G. You don't do
things halfway."

The move made sense. If there was a company like the military at the time, it was most definitely P&G, with its loyal, Midwestern, hierarchical culture and toe-the-line employees
dubbed "Proctoids."

Though McDonald had anticipated spending the rest of his career in Cincinnati, P&G was just beginning to see itself as a global company rather than an American one with offices
abroad. As he aced each assignment -- his superiors recognizing his engineer's attention to detail and his love of mentoring as an unusual mix of both IQ and EQ -- he got another, tougher
one.

In 1989, then-CEO John Smale asked McDonald to go to Canada to turn around the struggling laundry products division. McDonald saw being sent abroad as a sign that he wasn't on the fast
track. Who'd want to be away from the central hub? "My reaction was, 'What did I do wrong?' " says McDonald, who considered resigning.

Instead, he moved his family there, joined the P&G ice hockey team, read every Canadian book he could find, and learned that "you never say, 'Here's how we do it in the U.S.'"
Postings as general manager of the Philippines, as the head of beauty products in Japan, and in global fabric care in Belgium followed. The company's goal was to be sure that he could run
not only a country but also a category: Every emerging executive should do both.

McDonald's first official signal that he was a CEO candidate came when he was called back to Cincinnati to run both global fabric care and home care, then was named one of four vice
chairmen in 2004.

But there had been plenty of earlier hints: In 2002, Lafley announced a formal leadership development program for new general managers and, later, for experienced managers, which he chose
McDonald to lead.

Teaching a module in early September in Cincinnati, McDonald was in his element, speaking without notes about how important it is for managers to inspire their employees to great things.
He showed a clip from the film "Mr. Holland's Opus," starring Richard Dreyfuss, in which his students perform the symphony he wrote. "What stories are people telling about you in the
halls?" he asked.

Lafley's next step was to set up an executive group that was young enough -- but also high-powered enough -- to carry the company into the next decade. Although it is typical for a new
CEO to build his own team, Lafley had a slightly different idea: To form the new lineup, he worked with both McDonald and Susan Arnold, the other top contender and head of the beauty
business, as well as chief external relations officer Charlotte Otto. "Bob was involved, Susan was involved," says Nagrath, "so that if one of them became the CEO, then they would be
comfortable with the choice."

By March, Arnold had announced her retirement, something that both Lafley and McDonald insist she had always considered doing at 55. (Arnold declined to be interviewed.) Although the
board had not yet voted, the path forward appeared clear for McDonald, in part because of the outstanding job he did helping integrate Gillette, and also because of his operational skills
at a time when the company is facing cost pressures.

"I'm a good operator," says Lafley. "I think he's a great operator." He also has the people skills, a rare combination since most executives excel at one or the other. Says McNerney: "You
want to be in a foxhole with him."

The succession team -- Lafley, Nagrath, and McDonald, with help from the board -- began the next stage of the process: how to get ready for the changeover without making people feel that
Lafley was leaving the company in the lurch. Starting in the spring, the group met regularly, piecing together what the outgoing CEO's role would be.

Among his duties: reviewing businesses such as Braun, Wella, Clairol, and Iams; serving as a Yoda-type sage to McDonald; and mentoring some executives, such as Melanie Healey, the newly
appointed head of North America, and Phil Duncan, who runs design.

Internally, everybody was on the same page. But P&G still had to tell the world that its iconic CEO was leaving in the middle of an economic crisis. The group orchestrated every bit
of the announcement, from secretly pre-booking conference rooms around the world for town halls to mapping out who would call whom when the news broke. They also drafted a strategy meant
to spell out what would stay the same and what would be different. They called it "continuity and change" -- a pretty unoriginal effort from a company revered for its branding.

On June 9 the board unanimously elected McDonald CEO after an all-day meeting. The next morning at 10:30, McDonald and Lafley together announced the change to employees in a global
webcast. "He is the most experienced global executive who has ever served this company," said Lafley.

As soon as it was over, they hit the airwaves, calling customers, investors, and employees. McDonald made a particular effort to reach those who hadn't worked closely with him, like Gina
Drosos, president for Global Female Beauty. "He called me within two hours," she said. "He said, 'I just wanted to say I'm excited about my new role, and I want to partner with you.' What
a fantastic example! This guy just had the biggest announcement since maybe his wedding, and he's on the phone to me?"

The first town hall was in Cincinnati. From there Lafley and McDonald flew to Geneva; then McDonald went on to China, Singapore, and four cities in Central and South America over the next
month. Simultaneously, McDonald met personally with every director in his or her hometown -- a move that greatly impressed the board.

Yet there were slip-ups. For starters, someone leaked the announcement to the Wall Street Journal, which printed a story anointing McDonald before the board had voted. And some
outsiders were dismayed by the fact that just months after Lafley said he wasn't going anywhere, he was stepping down.

"It was done rather abruptly," says Ali Dibadj of Sanford C. Bernstein. "We had been saying A.G. had committed to deliver the decade, and the decade was one more year."

Lafley admits that the move came quickly, but says he wanted a new head in place before the recession ended. "I agonized. I obsessed," he says, "but I thought it would not be helpful for
me to stay another year or two, ride the recovery, and then hand it over."

Lafley also seems ready to move to the next stage of life. After going through a divorce, he chats about doing triathlons with his girlfriend, wears funky purple shirts, and says he has
no interest in further board work.

Yet for all the immediate confusion, things calmed down quickly. It helps that McDonald by nature is rock-steady: He gets up every morning at 4:30 to work out for two hours and make his
calls to Asia; he weighs what he did in high school; he has been married to the same woman, Diane, for 32 years and has two children he dotes on; he starts meetings exactly on time -- a
change from the previous regime.

Still, colleagues have seen a shift. "What's fascinating has been the switch," says Nagrath. "A few months back A.G. was doing this, and Bob was on the side." Even McDonald's voice has a
deeper timbre, he says. "I think he was preparing for it in private, all his life, and he suddenly unveiled himself."

A long way from the Cold War

Bob McDonald and I are walking through the middle of Moscow's Red Square. Well-heeled tourists stroll where soldiers once goose-stepped; the onion-dome basilica of Saint Basil's beckons,
and festive lights festoon the GUM department store, where Dior and Gucci have replaced the Soviet goods once available only to apparatchiks. Lenin's tomb sits quietly in the center.

"It is so incredible to stand here," says McDonald. He's referring to the fact that he was a soldier of the Cold War, someone who for decades believed the only way he'd ever arrive in
Moscow was via parachute. It is equally incredible that he is standing in Red Square on behalf of a $79 billion global company -- and that Russia is currently one of its top 10 markets,
with a leading share in everything from diapers to razors.

But McDonald is convinced that Russia can do better. That's why he is taking a rickety elevator to the seventh floor of a 29-year-old Russian woman's minuscule but immaculate living room.
He's here to see for himself why she uses the products she does. Although he's done it hundreds of times before, he still looks fascinated as she pulls out her beauty and cleaning potions
from a cabinet, explaining why she uses Mr. Muscle (Mr. Clean) but not Pantene or Secret. He nods enthusiastically when she mentions that since the crisis, she has started buying larger
sizes of detergent -- an insight that other P&G research supports.

It is this need to truly understand the consumer that is probably Lafley's biggest legacy -- and one that McDonald is actively continuing. But McDonald has moved beyond Lafley's famous
line "The customer is boss" to a more messianic -- and even more ambitious -- statement that sounds as much like a political ideology as it does a business strategy. P&G's new
purpose, he says, is to "touch and improve more people's lives, in more parts of the world, more completely."

In a mature market like the U.S., it's hard to argue that another brand of shaving cream can have any life-altering impact. But abroad it's a different story: McDonald becomes emotional
when he tells the story of how feminine napkins are helping girls in sub-Saharan Africa get educated. Before they had access to them, girls were banned from school one week a month.

Indeed, the line both articulates a growth plan and a motivational call to arms. Developing markets, which now make up 30% of P&G's sales, are the core of McDonald's strategy -- an
important differentiator from Lafley, who emphasized higher-priced products designed for a consumer with more disposable income.

Not all of McDonald's plans center on hearts and minds. He is ruthless when it comes to ferreting out waste, and he wants to take full advantage of P&G's scale -- something that was
not as much of a focus for Lafley, who was busy growing in a booming economy.

Dibadj notes that SG&A as a percentage of sales, at 30.4%, is down less than two percentage points in nine years despite the company's having doubled in size. (He says these costs
should have fallen further.)

Technology is another focus. McDonald wants P&G to be the first global company to operate in real time and has provided managers with a "dashboard" showing the relevant financial
metrics. On a tour of McDonald's new office, decorated with elegant Asian art, he is thrilled to show me a completely barren desk. He throws open his file drawers to show that they are
empty; indeed, there is no paper anywhere in the office. "What I need is right here," he says, tapping his computer and BlackBerry.

In the end, despite joking in Russia that the company is a "tandemocracy" like that of Putin and Medvedev, neither McDonald nor Lafley ever put much faith in the concept of dual leaders.
'You can have only one operating leader, and that's the chief executive," says Lafley.

Fortunately, McDonald already seems comfortable. He's committed to the company's plan to build 20 new plants in the next five years and has articulated an bold strategy to take share --
including making some of the price cuts eschewed last year and testing lower-end versions of products that may boost volume -- even though that may also put pressure on margins.

P&G watchers also hear a new, tougher tone. "My feeling is that Bob is starting out a lot more aggressively than A.G. did," says Citigroup Global's Wendy Nicholson, who cites recent
speeches peppered with references to taking share and beating rivals. But that competitive streak disappears when McDonald talks about Lafley.

During one interview McDonald paraphrases a scene in a book by Bill Bennett about Thomas Jefferson's replacing Benjamin Franklin as ambassador to France. "Jefferson turned to George
Washington and said, 'I can't replace Mr. Franklin, but I will succeed him.' I can't replace Mr. Lafley," he says, "but I will succeed him."