A door opens, and a blond man appears in a white jacket with large buttons. “Good morning,” he says. “Peter’s in back. Make yourself comfortable in the dining room. I’ll be serving breakfast shortly.”

Holy cannoli. Peter Thiel has a butler. The 40-year-old entrepreneur runs a $3 billion hedge fund. He’s the founder of a new venture capital firm that’s the talk of Silicon Valley. He’s got an early $500,000 stake in Facebook that’s now worth about $1 billion on paper. The man has bankrolled everything from restaurants to movies and is lauded by many as some kind of free-market genius. He drives a half-million-dollar McLaren supercar. And now a butler.

Just back from a morning run, Thiel emerges into the dining room of his home in the shadow of San Francisco’s Palace of Fine Arts. Wearing a powder-blue T-shirt wet with sweat, he displays the relaxed self-confidence of Michael Corleone. Perhaps it comes with the butler. “I’m Peter,” he says, extending his hand and smiling before thanking me for agreeing to such a late breakfast meeting. It’s 7:30 A.M. “It was nice to sleep in.”

The doorbell rings, and in walks a scruffy, sleepy-eyed Max Levchin, 32, who has trekked over from his new $5 million-plus home a few blocks away in Pacific Heights. Every garment on Levchin’s unwashed body is a freebie – University of Illinois zip jacket, mismatching shorts, bright orange T-shirt with some Hebrew lettering.

Levchin runs one of the hottest companies on the web, a photo-sharing site called Slide that draws 134 million users a month. Making neither eye contact nor conversation, he presses his lips together, nods to indicate that he is, as ever, ready for business, and sits.

It’s been nine years since Thiel and Levchin first dined together at Hobee’s, near Stanford University. Levchin had an idea for a company, and Thiel wanted to invest. In short order Thiel joined as a co-founder, and together they set out to “create the new world currency.”

Their brainchild would change the course of the Internet. They’d bring on several hundred employees to what would become PayPal. They’d sign up more than 20 million users and burn $180 million in funding before breaking even and selling out to eBay EBAY for $1.5 billion.

And then things got interesting. The eBay deal, remarkable only because it happened in the bleakness of 2002, wasn’t so much an exit as an explosion. Most of PayPal’s key employees left eBay, but they stayed in touch. They even have a name for themselves: the PayPal mafia. And the mafiosi have been busy.

During the past five years they’ve been furiously building things – investment firms, philanthropies, solar-power companies, an electric-car maker, a firm that aims to colonize Mars, and of course a slew of Internet companies. It’s amazing how many hot web properties can trace their ancestries to PayPal.

Besides Facebook FB and Slide, there’s Yelp, Digg, and YouTube. Thiel and Levchin, the don and consigliere of the mafia, figure that all told, there are dozens of enterprises worth a total of roughly $30 billion – and that value is growing rapidly, as evidenced by Thiel’s good fortune with Facebook.

This group of serial entrepreneurs and investors represents a new generation of wealth and power. In some ways they’re classic characters of Silicon Valley, where success and easy access to capital breed ambition and further success. It’s the reason people come to the area from all over the world. But even by that standard, PayPal was a petri dish for entrepreneurs. The obvious question is, Why?

Maybe it comes back to the early hires. After their first breakfast, Thiel and Levchin (left with Thiel) began recruiting everyone they knew at their alma maters. “It basically started by hiring all these people in concentric circles,” Thiel remembers. “I hired friends from Stanford, and Max brought in people from the University of Illinois.”

They were looking for a specific type of candidate. They wanted competitive, well-read, multilingual individuals who, above all else, had a proficiency in math. Levchin’s original idea for PayPal was to beam money between PalmPilots, but Thiel has a way of seeing the bigger picture.

A staunch libertarian, Thiel figured a web-based currency would undermine government tax structures. Getting there, however, would mean taking on established industries – commercial banking, for instance – which would require financial acumen and engineering expertise.

Thiel and Levchin also wanted workaholics who were not MBAs, consultants, frat boys, or, God forbid, jocks. “This guy came in, and I asked what he liked to do for fun,” Levchin recalls. “He said, ‘I really enjoy playing hoops.’ I said, ‘We can’t hire the guy. Everyone I knew in college who liked to play hoops was an idiot.'”

In other words, they were looking for people like themselves. A bilingual immigrant from Kiev, Ukraine, Levchin is the hypercompetitive son of a playwright father and a physicist mother. He’s numerate in the extreme and is an accomplished clarinetist whose athletic pursuits don’t typically take him beyond table tennis. He lives to work.

Born in Germany, Thiel has a J.D. from Stanford and did some time as a corporate lawyer. But finance has always been more his thing – Institutional Investor named his hedge fund, Clarium Capital, “global macro fund of the year” in 2005. (He was once ranked among the top under-21 chess players in the country, but he gave up playing competitively.

“Taken too far, chess can become an alternate reality in which one loses sight of the real world,” he says. “My chess ability was roughly at the limit. Had I become any stronger, there would have been some massive tradeoffs with success in other domains in life.”)

“All of this is about self-selecting for people just like you,” says Levchin. “He thinks like me, he’s just as geeky, and he doesn’t get laid very often. Great hire! We’ll get along perfectly.”

Recruiting underclassmen from the middle of the country assured Levchin that his charges would have few preconceived notions and fewer social distractions. “Most of them were very introverted anyway,” Levchin recalls. “They’d come in, eat crappy food all day, and sleep under their desks.”

Early on, disagreements sometimes broke out into wrestling matches, and on at least one occasion Levchin worried that he had a serious fight on his hands. As with the real Mob, PayPal wasn’t exactly welcoming toward women.

When it came time to hire a high-ranking female engineer, she turned out to be bad at Ping-Pong. Levchin took that as a lack of competitive fire but grudgingly hired her anyway. She quit within six months. “Peter never fails to rub that in,” he grumbles.

Of course Google GOOG is also famous for a relentless pursuit of brainiacs. But PayPal was no Google. “The difference between Google and PayPal was that Google wanted to hire Ph.D.s, and PayPal wanted to hire the people who got into Ph.D. programs and dropped out,” says Roelof Botha, PayPal’s onetime CFO who went on to become a general partner at one of the nation’s most powerful VC firms, Sequoia Capital, and put the first venture money into YouTube. “It’s a different temperament.”

The PayPal-ers who didn’t possess Thiel’s anti-establishment streak as new hires had it by the time they left. The PayPal culture wasn’t just antigovernment. It was anti–mainstream thought.

Thiel, ever the freethinker, has donated $3.5 million to the Methuselah Foundation, a life-extension-research organization run by the controversial academic Aubrey de Grey, who believes humans will one day live to 1,000.

Thiel sits on the board of the Singularity Institute for Artificial Intelligence, which concerns itself with the coming merger of man and machine. In the early days at PayPal, he even discussed establishing cryogenic storage as an employee benefit.

Thiel’s leadership style is as unconventional as his worldview. His hallmark management MO at PayPal (at least, pre-IPO) was the all-hands open-book session. Customer logs, revenue flow, fraud losses, burn rate: He’d display it all for every employee to see. This access to information, coupled with the lack of offices, created a flat structure where any idea could win the day.

“Good decision-making flows out of details,” says former COO David Sacks, who now runs both the online genealogy startup Geni and the Hollywood production studio Room 9 Entertainment, which made Thank You for Smoking. “We did not subscribe to the idea that managers are this special class of employee.”

Sacks himself almost didn’t get hired by PayPal – perhaps because of a short stint at McKinsey. But Thiel recognized him as an important dissenting voice, someone who could sharpen the company’s focus.

Once he came on, McKinsey taint notwithstanding, Sacks further opened the culture by establishing a no-unnecessary-meetings policy. He became a meeting cop. Anytime he’d see a closed-door discussion happening, he’d sit in for three minutes. If he considered the meeting to be valueless, he’d call it adjourned.

Sacks, in his office on Sunset Boulevard in West Hollywood, recalls how the lack of meetings helped create a culture of many workers and few managers. “You didn’t measure where you were in the organization by how many people you’re managing,” he says. Prestige was measured “by how few people there were above you who could prevent you from doing what you wanted to do.”

Back in Silicon Valley, Reid Hoffman, a former executive VP, sits in his own office at the social networking site he started, LinkedIn. Hoffman is one of the Valley’s most prolific angel investors, with stakes in more than 60 startups, including Facebook and Digg.

Like Sacks, he loved PayPal’s meritocracy. “The group was very analytical,” says Hoffman. “It was all about, ‘Here are my arguments; here’s my perspective.’ You could never say, ‘In my experience,’ because experience wasn’t there as a variable.”

Not everyone liked the PayPal vibe. Chief among the dissenters is Elon Musk.

It’s free-lunch Friday at the space-exploration company SpaceX, down the road from Los Angeles International Airport. The massive fuselage of a rocket ship dominates the ground floor. In its shadow, dozens of employees sit cramped at a handful of foldout tables.

There are no seats to be had, not even for the man who invested $100 million of his own money to start the company. So Musk and I retreat to his desk. I’ve just asked him what it was like to be the victim of a coup led by Sacks, Levchin, and Thiel. “It was like unicorns and rainbows, flower-filled meadows,” he says with a smirk.

Musk (pictured right) came to PayPal not through Levchin/Thiel’s regime but during the company’s merger with his Internet bank, X.com. Born and raised in South Africa, Musk sold his first company, Zip2, to AltaVista at age 28 for more than $300 million. Now 36, he’s running SpaceX, which plans to send people into space and eventually colonize Mars, and serves as chairman of Tesla Motors (electric cars) and Solar City (solar-panel installation).

Despite having perhaps the greatest entrepreneurial streak of all the PayPal mafia, Musk was purged from PayPal like some kind of toxin. Soon after the merger, Thiel resigned.

Musk became CEO of the combined company and decided it was time for a technological overhaul. Specifically, he wanted to toss out Unix and put everything on a Microsoft platform.

That may sound innocent enough to laypeople but not to Unix zealots like Levchin and his team. A holy war ensued. Musk lost. The board fired him and brought back Thiel while Musk was on a flight to Australia for his first vacation in years. “That’s the problem with vacations,” Musk deadpans.

Musk still contends he didn’t deserve his fate, that his biggest flaw was being cut from different cloth. “Peter, Max, and I are not directly aligned philosophically,” he says. “Peter’s philosophy is pretty odd. It’s not normal. He’s a contrarian from an investing standpoint and thinks a lot about the singularity. I’m much less excited about that. I’m pro-human.”

It wasn’t just Musk; anyone who didn’t mesh with the Levchin/Thiel culture ran into trouble. X.com had a number of people from the banking industry who didn’t last long. “We had been rivals, so it was awkward,” remembers Jeremy Stoppelman, who was an engineer at X.com, stuck it out after the merger, and is now the CEO of Yelp, a fast-growing restaurant- and bar-review site.

“And that awkwardness turned into total dysfunction and warfare. Most X employees ended up leaving or getting fired. The culture was really an intellectual pissing contest, and some people didn’t like that.”

The infighting eventually stopped. It had to, because there were too many other enemies to deal with – eBay, for example. Before buying PayPal, the auction giant tried in various ways to kill it – by purchasing a competing service, for example.

Meanwhile, PayPal losses were multiplying. It battled Russian fraudsters who were filching millions by cribbing credit card numbers. Customer-service complaints flooded the phone lines and in-boxes and were often dealt with by simply not answering the phone or doing a mass deletion. Louisiana temporarily banned PayPal from doing business in the state; MasterCard MA threatened to pull the plug because of the high number of chargebacks.

“Peter Thiel didn’t know what a chargeback was,” says Jawed Karim, an early engineer who went on to found YouTube with fellow alumni Chad Hurley and Steve Chen – and then sell it to Google for $1.65 billion. “That’s one of the fundamental things of any credit card payment system. Chargebacks almost killed the company.”

But the executive team made up for nonmastery of details with unwavering vision, which inspired the troops. At his San Bruno, Calif., office, YouTube CEO Hurley remembers his PayPal days as an education in business. When he arrived in California with a degree in art from Indiana University of Pennsylvania, building a successful company seemed like something other people did.

“You never think it could happen to you,” says Hurley. “But seeing Peter and Max and the guys come up with ideas and seeing how to make things work gave me a lot of insight. You may not have a business degree, but you see how to put the process into effect. The experience helped me realize the payoff of being involved in a startup.”

After 11 revisions to the prospectus, PayPal pulled off its IPO on Feb. 15, 2002. The stock closed that day at $20 a share and rose for the next nine months, even as Nasdaq cratered, until the sale to eBay. Thiel walked away on the day of the acquisition; Levchin and Sacks followed. Botha considered sticking around – “Meg Whitman made me a terrific offer,” he says – but left for Sequoia to stay in the startup game.

For those who remained in the name of a paycheck, the culture shock was profound. Premal Shah, a former product manager at PayPal and now president of Kiva.org, was put in charge of eBay’s developing-world strategy. He went to India for three months – a dream assignment. But when he got back, it seemed that every day meant another PowerPoint presentation for yet another layer of management. “I quit after a year,” he says.

By then, the PayPal mafia was well established. Today they call upon one another when they need money or advice – and when they need both, they go to Thiel, who seems to be at the center of it all. Among his many investments, Thiel has money in Slide, Yelp, and LinkedIn.

He helped his former assistant start Laïola, one of San Francisco’s hottest new restaurants. His venture capital startup, the Founders Fund, invested the first $1.5 million in Sacks’ Geni.com, where five of the 29 employees are from PayPal.

Levchin invested in IronPort systems, which was founded by early PayPal investor Scott Bannister and acquired by Cisco for $830 million. He put the first $1 million into Yelp and serves as its chairman.

He’s also got money with Botha at Sequoia (even while Sequoia has a stake in Slide’s rival, RockYou) and was an executive producer of Thank You for Smoking, along with Sacks, Thiel, and Musk. That last name may come as a surprise, but Musk has made peace with his mutineers.

He has invested in Room 9, Geni, Botha’s Sequoia fund, and Clarium Capital. (But he won’t let Thiel reciprocate. “We don’t need the money,” says Musk with a wry smile.)

As for the impact of PayPal’s culture, that varies. At some places, like Slide, Levchin’s work ethic lives on- though his hiring practices seem to have softened. His head of engineering, for example, was on the Stanford water polo team. “He probably likes to play hoops,” Levchin jokes.

At other places there’s nary an intellectual pissing match in sight. YouTube’s quiet San Bruno office might be taken for a division of a large corporation (which it is).

At Yelp, Stoppelman has become a regular on the San Francisco party circuit, and these days spends little time sleeping under his desk. But both YouTube and Yelp learned a valuable lesson from PayPal: The first idea isn’t always the best. Yelp was a convoluted e-mail referral service before becoming a top review site. YouTube started as a video dating play. Now it’s at the center of the zeitgeist.

The mafia doesn’t often convene in a physical place- they don’t have a Bada Bing, where Tony Soprano and his crew would hang out. But they do have a sense of humor, and so at FORTUNE’s request, the capos are gathered in Tosca, the legendary San Francisco watering hole, for a group photo.

Frank Sinatra is here, crooning from the Wurlitzer. So are Thiel, Levchin, Sacks, Botha, and many others. Musk wanted to come, but he’s in Chicago to receive an “innovator of the year” award. Hurley and Chen bowed out after their Google handler objected to the gangster motif.

The group is decked out in gold chains and tracksuits, smoking cigars, drinking Maker’s Mark. It’s a happy moment, even if the lack of Wi-Fi makes Levchin antsy. Looking at the group laughing and joking, you’d never guess they’re all supercompetitive hyperintellectuals- or that some don’t like each other very much. But when you get to know them a bit, it’s not all that surprising. As Stoppelman puts it, “We’re all a little weird.”

This is from the November 26, 2007 issue of Fortune Magazine