Updated from 7 a.m.

Securities law guru John Coffee is one of the more outspoken opponents of insider trading. But that hasn't deterred him from helping hedge funds beat the rap on those charges.

The oft-quoted Columbia University Law School professor has often testified before Congress on the evils posed by insider trading and other securities offenses. Just two months ago, Coffee told the Senate Judiciary Committee that insider trading was on the rise in the U.S. and that prosecutors needed to be more aggressive in prosecuting rogue traders.

But even as Coffee decried what he called an "uneven pattern" of insider trading prosecutions, he was working behind the scenes advising hedge funds, drawing scrutiny in a lengthy regulatory investigation into the market for PIPEs, or private investments in public equity.

A little over a year ago, Coffee testified at a regulatory hearing on behalf of Michael Finkelstein, a Canadian broker-turned-hedge fund manager. Finkelstein was charged by Canadian regulators with violating U.S. insider trading laws in three PIPE transactions. He couldn't be reached for comment.

TheStreet.com

also has learned that Coffee is serving as a consultant to Gryphon Partners, a Dallas hedge fund that's being

investigated by the

Securities and Exchange Commission

for similar trading infractions in other PIPE deals.

Small, cash-strapped companies often turn to a PIPE as a quick way to raise money by selling discounted stock, or a bond that converts into discounted shares, to hedge funds and other institutional investors. But the $22 billion PIPE market has been rife with abuse, especially by traders looking to take advantage of the usual decline in a company's share price immediately after the completion of a deal.

For the past three years, securities regulators and prosecutors have investigated allegations that some hedge funds are trying to game the PIPE market, by shorting shares of companies considering a PIPE deal shortly before a transaction is announced. Regulators argue the short sales are improper because the hedge funds are using confidential information to place bets against a company's stock.

To date, the wide-ranging investigation has resulted in a half-dozen regulatory actions and at least two criminal prosecutions. More enforcement actions are in the works.

Coffee, who wouldn't comment on the work he's done for any individual client, makes no apologies for his outside consulting activities. The noted legal expert says he's a staunch opponent of insider trading, but believes the SEC is trying to stretch the law in many PIPE cases.

"I don't believe you can change the definition of insider trading," says Coffee. "I think

PIPE cases are very difficult to prove."

Coffee contends regulators and prosecutors are pushing the law too far by arguing that a hedge fund has done something wrong by shorting a stock simply because it's learned of an upcoming PIPE. Unless there's some formal agreement forbidding a hedge fund from trading ahead of a PIPE deal, he says, regulators are barking up the wrong tree.

"Insider trading needs to be zealously enforced, but that does not mean that the SEC can change the rules through enforcement proceedings," says Coffee. "The rule of law depends upon the government playing by the rules and not changing them in midstream."

Coffee's view that the SEC is playing fast and loose with the definition of insider trading when it comes to PIPE cases was a winning argument before the Canadian hearing panel, which tossed out the charges against Finkelstein.

Of course, the SEC and federal prosecutors would beg to differ with Coffee and the Canadian panel. Federal authorities have become quite aggressive of late in going after what they perceive as roguish behavior by hedge funds playing in the PIPE market.

In September, federal prosecutors announced the indictment of former hedge fund manager Hilary Shane on charges she violated insider trading laws by profiting from a series of short trades in shares of

CompuDyne

( CDCY) in 2001. Prosecutors charged Shane shorted shares of the Maryland security company with the knowledge that the company's upcoming $12 million PIPE deal would price at a significant discount to the stock's then-market price of roughly $17.

In May, Deephaven Capital Management, the $3 billion hedge fund run by

Knight Capital

(NITE)

, paid a $5.7 million fine to settle allegations that on at least 19 occasions it improperly shorted shares of companies doing PIPE deals.

It's not clear whether Coffee's behind-the-scenes consulting work for Gryphon will pan out. The SEC hasn't formally charged the $265 million hedge fund with any wrongdoing. But sources say regulators are demanding that the fund pay a stiff fine to settle the matter.

SEC officials declined to comment on the Gryphon investigation. Lawyers for the hedge fund, led by Edwin "Bucky" Lyon III, declined to comment.

People close to the SEC say regulators are a bit dismayed at the pro-defense work Coffee is doing in PIPE cases. That's especially so in light of his recent comments about U.S. authorities needing to be more aggressive in combating insider trading.

But Robert Mazzeo, a New York securities lawyer summoned by Canadian regulators to testify against Finkelstein, says he's not surprised at Coffee's advocacy.

"He has to make a living," says Mazzeo, who specializes in representing hedge funds that invest in PIPE deals. "I'm sure they paid him a pretty penny and I'm sure he felt this was an interesting entree into being hired by other firms."

Coffee contends the penny wasn't actually all that pretty.

"I received only a trivial fee from Gryphon for very modest work,'' Coffee says in an email reponse to a question about the compensation for his consulting work. "One way to illustrate this is that I received a larger fee over the last 12 months from the SEC for serving as their expert in an enforcement case (and I only charge the SEC half my normal rates). Less than 1% of my gross income over the last year came from Gryphon; that is about as immaterial as you can get. But I cannot discuss any advice that I gave them."