Gerry Harkins and Brack Maggard grew up together in Perry, Ga., attending the same elementary school, high school, and church. In 1980, they went into business together, and now own Southern Pan Services Co., a concrete-formwork construction company. Now, they're both 56 and thinking about retiring. "We'd like to be able to step away from the business in five years or so," says Harkins.

There's just one problem: cashing out. Given the stock-market slump, not to mention the nature of their company, an initial public offering is hardly an option. Potential buyers are scarce. And besides, the pair is hardly willing to sell the business they've spent years building to just anyone -- even if such a deal could be financed, an uncertain proposition in today's tough market.

Thousands of business-owning baby boomers likely will find themselves in the same spot over the next decade or so. Many entrepreneurs have as much as 90% of their net worth tied up in their companies. The trick is turning that stock into cash on which to retire. Enter the ESOP, or Employee Stock Ownership Plan. Interest in ESOPs has been exploding over the past few years, and it's easy to see why. The plans allow owners to sell their companies directly to their employees, in transactions financed by the company itself. What's more, sellers can defer capital gains tax on the proceeds of that sale if they reinvest it in certain kinds of assets. "This is a very appealing exit strategy," says Steven Fischer, a lawyer and partner in Shared Equity Strategies Inc., a Philadelphia consulting firm.

Appealing, perhaps, but ESOPs also are expensive to set up and can be quite tricky to operate. Not only will you need to conduct an independent valuation of your company, you'll also need to hire a lawyer specializing in pensions and trusts and a third-party administrator to oversee the program. Those costs can add up fast, often to tens of thousands of dollars. Indeed, in order for an ESOP to work, a business needs to be profitable, with at least $2 million in total valuation, and should be relatively insulated from boom-and-bust cycles. The terms of such programs vary widely but, in general, here's how they work:

Say an entrepreneur decides to sell 40% of his company, valued at $10 million, to his employees. To transfer ownership, the company creates an ESOP -- a kind of trust account -- and takes out a loan from its bank for $4 million, 40% of the firm's value. The company then loans the $4 million to the ESOP, which uses the funds to purchase the owner's stake. Then, the company repays the loan by making annual payments through the ESOP, treating the payments as they would any other employee-benefit expense. After each payment, a proportionate number of shares are transferred into individual employee ESOP accounts. Finally, after five years, when the $4 million loan is repaid, the employees will own 40% of the company through the ESOP. Employees vest in the program over time, just as in a 401(k), and can only cash out when they retire, are laid off, resign, or are fired.

CASHING OUT: Harkins and Maggard are selling 40% of their company to their staffers.

Here's the best part, at least for owners: As long as the $4 million is reinvested in what's called "qualified replacement property" -- stock in U.S. companies or bonds, but not passive investments like mutual funds -- an owner can defer paying what might otherwise be a hefty capital gains tax liability. To get that benefit, an owner must sell at least 30% of the company. But he can sell as much as 100% in a single transaction -- or, most commonly, a series of deals spread out over a decade or so, during which time the owner gradually transfers ownership and day-to-day management of the business.