STILLWATER, OKLA. (Fortune Small Business) -- The drilling rig rose incongruously over the peaceful college town of Stillwater, Okla. It roared and screeched with activity. Roughnecks, slathered head to toe in mud, scrambled and cursed a blue streak as they threw chain and tripped out two-ton stands of pipe. D.G., a.k.a. "Stretch," a good-natured chain hand, weighed in with a salvo of riotously profane slander, largely addressed to his fellow oil drillers. It could have pinned back the ears of the most depraved drill sergeant on earth. It could have peeled paint.

"There, write that in your magazine!" he yelled with a grin.

I had joined these characters on the Stillwater Project oil rig because, against the back-drop of a global energy crisis, I was hoping to witness the moment when a rock hound named Mark Herndon found out whether he could actually strike oil by drilling horizontally beneath a small Oklahoma city.

Everyone is here because of Herndon. There's the full hierarchy of the oil patch - from the lowliest worm hand to the studly directional drillers with their black books and their azimuths, rocking out to Neil Young in their air-conditioned trailers, to Bob Graves, 48, the drilling superintendent, whose job is to keep the rig running at all times, to Jess Porter, 56, president of EEC Inc., who found the 17 investors from Oklahoma and as far away as Indiana.

They're all here because Herndon, an independent oil geologist, had a thought - a fleeting moment of inspiration - while driving down the road in the middle of the night two decades ago. The "unconventional stratagraphic play" Herndon dreamed up was about oil hidden in a tight, ten-foot zone of sandstone a mile deep that nobody had ever bothered to drill for, perhaps because it lay beneath a city. But what if somebody drilled, horizontally, beneath the Wal-Mart (WMT, Fortune 500) and the Applebee's and the Starbucks (SBUX, Fortune 500), beneath the campus of Oklahoma State University, winding up directly under Boone Pickens Stadium? What if the fancy new tools of directional drilling could bore a mile into the earth, make a 90-degree gradual bend, and hit a target the size of a beach ball?

Whoever pulled that off might find a million barrels of oil.

Or, they might not.



The biggest bet

In the preceding months another principal character, Dave Swafford, 51, the project's land man, had performed a small miracle - securing more than 500 drilling leases from city residents, including the City of Stillwater and Oklahoma State University, all while keeping the deal more or less secret.

With the leases secured, it would cost Jess Porter more than $3 million to find out whether Mark Herndon's idea was worth anything. For his part, Herndon would pony up $60,000 to establish a 1/32 interest in the well. His payoff could be more than $3 million. The lead investor, known in the business as the "bell cow" for the ability to attract other investors, stood to make more than $30 million.

It was a simple but elegant scheme. "A great idea," said Swafford, beaming. "Even if it's a dry hole, it's still one hell of an idea."

It would be quite a trick if they could pull it off - the biggest bet that Herndon and Porter and Swafford had ever made, definitely a company maker, as wells like this are sometimes called.

"It's my all-in moment," says Herndon, a thoughtful, talkative bear of a man who in those nerve-racking few days was usually found wearing shorts, an oil-stained T-shirt, and nerdy glasses, clutching a cigarette in one hand and a bottle of Mountain Dew in the other.

Herndon's task was to find and then drill horizontally through what everyone hoped would be an oil-laden geological zone called the Lower Skinner Sandstone. Most vertical wells tap just the smallest fraction of a zone. But a well that moved horizontally through oil-bearing rock would be, as Herndon liked to say, a screamer.

It had taken directional drilling technology 20 years to catch up to Herndon's idea. Using his knowledge of the strata below, Herndon would guide the directional drillers and the tons of pipe that trailed the bit along a gradual 90-degree bend to their landing point, a target 4,376 feet beneath Boone Pickens Stadium.

Herndon needed to hit the Lower Skinner dead-on. If he missed, the only way to find the zone would be to start dragging tons of pipe up and down - to porpoise - and risk getting $700,000 worth of drilling gear stuck underground.

Once in the zone, Herndon's next task would be to determine whether it contained enough oil, or "pay," to continue. In the old days oil might simply gush to the surface. Now the weight of tons of drilling mud held back gushers of oil and gas.

Rock cuttings from the drill bit percolated upward through the mud. A mud logger would collect cutting samples and catalog them while Herndon peered through a microscope at the tiny specks looking for "show." Under a black light, oil will fluoresce and turn gold. A nice glow would mean that he had a producing well. No glow would mean no go - Herndon would be out 60 grand, and Jess Porter would have himself a $3 million hole in the ground.

The closer the drilling crew brought the bit to its target, the more Mountain Dews and cigarettes Herndon consumed.

Herndon, 47, is a former parachuting BASE jumper, rock climber, and wilderness backpacker. But he does not consider himself a gambler.

"It's really all about risk management," he says. "The gamblers eventually disappear."

He's been calling his own shots since graduating from the University of Oklahoma with a degree in petroleum geology. He lived through the great oil bust of the early 1980s, when the price of oil plummeted to $9 a barrel and many of his colleagues fled the business. Herndon hung on, sometimes just barely, and over two decades has learned every aspect of wildcat prospecting, from generating geological "ideas" - educated guesses as to where oil and gas may hide in the strata - to attracting investors, to haggling with farmers over mineral leases, to hiring drilling crews, even to digging ditches for gas pipelines.

In recent years, soaring fossil-fuel prices have completely transformed the hardscrabble world of independent oil drilling. Here in Oklahoma, locals are quitting full-time jobs to hire themselves out as hands on drilling rigs. Specialized skills - such as Herndon's 25 years of oil geology experience - are at a premium. Right now Herndon is so busy that he can't keep up with all the prospecting work.

"I'd never go to work for a big oil company," he says. "Sure, you get a good salary, but you don't get equity in the wells."

After accumulating interest in dozens of wells, Herndon was able to take several years off. He took up photography and lived off his royalties until the current boom made the Stillwater Prospect economically possible.

"Stillwater was feasible when oil was at $60 a barrel," says Jess Porter. "Now it's just amazing."