I. Lewis "Scooter" Libby was walking down a nearly deserted street in Des Moines, Iowa, last year after a long day on the campaign trail with his boss, Vice President Dick Cheney. Libby encountered a group of reporters who had just finished dinner at a saloon-style restaurant.

"Heading for the bar?" one reporter asked.

No, Libby said, pointing to an alternate destination across the street: a storefront with a sign advertising the services of a bail bondsman.

It was a small dose of gallows humor at a time when it still seemed safe to joke about a federal leak investigation that had yet to cause any serious ripples for a White House team cruising toward reelection. But Libby's quip was also an acknowledgment that a threat was looming, and that a day like today might come.

Libby resigned today after being indicted on charges of obstruction of justice, making false statements and perjury by a grand jury investigating the disclosure of the identity of CIA operative Valerie Wilson, also known by her unmarried name, Valerie Plame.

The indictment represents a significant blow to the Bush administration brain trust. Karl Rove, who escaped indictment but remains under investigation by the special prosecutor, is a more powerful and better known figure, a political operative who helped orchestrate George Bush's rise from Texas politics to the presidency.

But Libby has had a more direct hand in the national security decisions that have largely defined this administration, particularly the invasion of Iraq. He is the closest adviser to the most powerful vice president in modern history. And in a workplace where a single job title carries considerable clout, Libby held three: chief of staff to the vice president, national security adviser to the vice president, and assistant to the president.

Libby has varied interests — he is a skiing fanatic, a fan of the occasional shot of tequila, and the author of a well-received novel, "The Apprentice," set in a blizzard in turn of the century Japan. "He's a little edgy," said an administration official who has worked with him, adding that Libby is fond of pursuits "you don't think of a guy named Scooter doing.'"

Libby's predicament is mind-boggling to many of his closest colleagues and friends, who say he is not a conservative ideologue, and is known for his discretion.

Jackson Hogen, Libby's roommate at Yale University and a frequent skiing companion, recalled probing Libby on a ski lift several years ago for his views on how the administration planned to confront North Korea. Libby deflected the question by joking that he believed the United States "should adopt a policy of vigorous name-calling," Hogen wrote in a 2003 column in Ski magazine.

"By nature and profession he is someone who prizes discretion and saying the right thing at the right time," Hogen said in a telephone interview this week. "It does seem odd that he would be the one shoved into this particular noose. But this tale is nothing if not strange."

Libby, 55, was raised in Connecticut, the son of an investment banker who gave him the "Scooter" nickname after watching the boy scoot across his crib. Libby attended the elite Phillips Academy in Andover, Mass., where he was a prominent figure on campus and the head of the debating society.

His political leanings were Democratic in the late 1960s. He supported the presidential campaign of Robert F. Kennedy. But at Yale, Libby enrolled in a class taught by a young professor named Paul D. Wolfowitz, and became enamored of the neoconservative view that the United States should be more assertive in spreading American-style democracy overseas.

In 1981, it was Wolfowitz who launched Libby's career in government. Wolfowitz, an assistant secretary of State during the Reagan administration, recruited Libby from his law practice in Philadelphia to become a speechwriter at the State Department.

Later, in the first Bush administration, Wolfowitz brought Libby to the Pentagon as his assistant. The two helped draft a post-Cold War manifesto urging the United States to establish itself as an unrivaled superpower. They also disagreed with President George H.W. Bush's decision not to press toward Baghdad after expelling Saddam Hussein's troops from Kuwait.

"We objected to it," Libby said of the decision to halt the war, according to an account in "Rise of the Vulcans," a history of Bush's war cabinet by former Los Angeles Times reporter James Mann. "I was floored by the decision. Neither of us liked it."

It was during his stint at the Pentagon that Libby caught the notice of Cheney, then serving as secretary of Defense.

Libby spent much of the 1990s working at a Washington, D.C. law firm, where his client list included Marc Rich, the wealthy fugitive who was given a controversial last-minute pardon by President Bill Clinton.

When Bush was elected in 1998, Cheney quickly tapped Libby to be one of his top aides. And after the Sept. 11 terrorist attacks, the two were among the leading proponents inside the administration that the United States' response should include confronting Iraq.