When California legal clerk Erin Brockovich dug up what turned out to be the biggest corporate environmental liability case in history, she was determined not to give up until she got redress for the victims.

The real case against Pacific Gas & Electric Co. eventually resulted in one of the largest corporate settlements in U.S. history: $333 million in 1996. But, as documented in the 2000 movie about her, Brockovich was disappointed and frustrated to see much of the responsibility -- and fees -- for the case given up to a much larger Los Angeles firm before it was over.

That's because her own boss, Edward Masry, lacked the size and financial resources to keep going on his own with his small firm. So he had to sell a major portion of their biggest case.

"We really had no other options. When you're out of capital, you really have nowhere else to turn," said Christopher Levinson, administrator of Masry & Vititoe in California.

That's unlikely to happen to the firm today. Masry & Vititoe, where Brockovich is now director of research, is a client of Counsel Financial Services LLC, a seven-year-old Amherst commercial finance company that caters to plaintiffs' law firms.

Its sole job is to lend money to personal injury and other lawyers, providing them the working capital to keep their business going, pay legal and other expenses, and pursue the cases their clients hired them for.

In short, it wants to save small firms from having to give up their biggest opportunities.

"We are constantly exploring new cases as they present themselves. And when we need the resources, Counsel Financial is there for us," Levinson said. "We've been able to help a lot more people out there."

In just five years, the fast-growing Counsel Financial has soared from $3 million in outstanding loans to $160 million, while winning a coveted high rating from a national debt ratings agency. It now has a line of credit from banking giant Citigroup to support its growth, and won a national trade group's endorsement.

The company employs 24, expects to grow to 35 by next year, and plans to move to 6400 Main St. in Williamsville. And it has helped 150 law firms, with 105 holding loans now.

It also has a big name in the legal community at its helm: retired state Supreme Court Justice Joseph S. Mattina.

"The legal community needs us," said Mattina, Counsel Financial's chairman and chief executive officer since 2004. "We're there now, so they don't have to refer out and lose 60 percent to 80 percent of their fees."

Counsel Financial is part of a new litigation finance industry that has sprung up in the last 15 years to serve a market that it estimates could reach $40 billion. These companies help personal injury law firms and their clients get over financing humps as they wait for cases to be won in court or settled.

There are about 150,000 trial lawyers nationally. Such attorneys receive contingent fees, which mean they get paid only if their client gets money. So routine court delays or automatic "stays" of judgments on appeal make that hard to predict.

"We're frequently dealing with the up-and-down nature of the cash flows," said Michael P. Callahan, Counsel's chief financial officer, whose family is a co-owner through a trust.

Most businesses can turn to banks for help, but law firms are often stuck. Banks don't consider legal cases to be assets and won't lend based on the value of "contingent fees" since there's no guarantee of getting them. So the only way to get a bank loan is for the partners to borrow money personally or use their credit cards.

But besides being costly and putting the partners' own money and assets at risk, the interest on personal loans is not tax-deductible. Also, until the case is finished, attorneys can't deduct the enormous legal case expenses that are incurred.

On the other hand, if they use a business loan to pay those disbursements, the interest can be deducted, making it more attractive than a personal loan.

"The civil justice system, as wonderful as it is, is driven in great part by the ability to have not only good lawyers on both sides, but to have the financial wherewithal to represent clients equally on both sides," said Michael Blum, co-founder, co-owner and CEO of San Francisco-based LawFinance Group, one of several competitors to Counsel. "It's a relatively new financial resource for them."

>Company founded in 2000

Counsel was founded in November 2000 by President Joseph DiNardo, a former Amherst attorney who was suspended from practice that year after pleading guilty to filing a false federal tax return. He originally owned 32 percent of the company, but transferred that to a family trust that he says he does not manage.

DiNardo is also the founder and president of Plaintiff Support Services, a 15-year-old company that lends money to personal injury plaintiffs while they await settlement. Aside from DiNardo's roles, company officials insist the two companies are separate entities. But they share a suburban office suite in the Bryant Woods Office Park in Amherst.

DiNardo and Mattina have known each other for years. Mattina once employed DiNardo as a law clerk and, as Erie County Surrogate Court judge, he later appointed DiNardo as a trustee of the Statler Foundation. After DiNardo pleaded guilty to the federal tax charge, Mattina rejected then-State Attorney General Eliot L. Spitzer's attempt to remove DiNardo from that post because the lawyer was not jailed or disbarred.

When Mattina retired three years ago, DiNardo recruited him to head up Counsel Financial, seeking to give the upstart firm an extra layer of credibility by putting a respected judge at the helm. The 74-year-old Buffalo native and former prosecutor spent 40 years on the bench.

"Lawyers are like Pavlov's dogs. When they hear 'judge,' they bow and scrape," Mattina joked.

Counsel Financial makes loans based on the estimated value of a firm's total portfolio of cases, which could include a mixture of auto injury, product liability, environmental and pharmaceutical lawsuits, among others. It considers actual damages being sought, but doesn't count punitive damages in valuing cases.

The company looks for client firms to have a wide variety of cases, rather than putting all of their eggs in one basket. So 1,000 different auto injury cases could be acceptable, but not 1,000 different Vioxx cases relying on the same set of circumstances.

"We don't want a firm that is expert in one area. We want them to have diversity," Mattina said.

Company executives also evaluate a firm's creditworthiness, including revenues, expenses and ability to repay. They also want to see that the applicants are managing their firms well, and not wasting money. Mattina has encountered lawyers who built lavish homes -- one was a Versailles replica in the desert Southwest -- or bought airplanes and expensive cars. Those firms were denied.

"Lawyers cross every 't' and dot every 'i' when it comes to their clients," Mattina said. "When it's their own money, they're sloppy."

Finally, the company considers the law firms' reputations. "We're Googlers," Mattina said. "We're very careful of the clientele we accept."

The company typically offers a four-year finance package that combines a revolving line of credit in the first two years with a term loan for the last two. Customers make interest-only monthly payments for the line of credit, but must also start paying off the principal if they receive a certain amount of fees. For the last two years, the firms pay principal and interest.

>Charges hefty interest

The average line of credit is $1.5 million, but can be as little as $50,000 and as much as $25 million. Interest rates range from 18 percent to 32 percent, including closing and application fees. Partners in the client law firm also must provide personal guarantees and get term life insurance for 100 percent of the loan amount. Currently, its loans are secured by more than $2 billion in anticipated fees, guarantees and insurance.

Firms usually pay off the loans ahead of schedule, using extra punitive damages they receive from lawsuits. Only four loans have defaulted, one due to the lawyer's death. Of those, two have been repaid and one is being repaid. And Mattina works with individual lawyers who encounter problems with repayment.

Counsel wasn't profitable until 2004, but earned $2.5 million each in the last two years, giving it $5 million in equity. It got its first line of credit from Citibank in 2004 for $9 million, through the personal guarantee of its owners. It now has a $150 million line from Citi, with an "A" rating from Fitch Ratings.

It also has $32 million in subordinated debt outstanding -- the type of debt that ranks after other debts should a firm go bankrupt. Half of the debt is held by the owners and founders, who also include Arthur Luxenberg and Perry Weitz of Weitz & Luxenberg P.C., a personal injury firm in New York City.

"I'm not an owner. I'm just an employee here," Mattina said. "They work me. They send me all over the country."