A federal judge in Manhattan Monday upheld the

New York Stock Exchange's

protection from certain legal challenges and said he would dismiss a lawsuit by a former floor broker who claimed the exchange condoned years of illegal floor trading.

U.S. District Court Judge Jed Rakoff also said he would remove the NYSE as a defendant in a separate

Securities and Exchange Commission

enforcement action related to the illegal floor trading. (

TSC

covered the onset of this

case two weeks ago.)

Rakoff, however, did direct the exchange to turn over to a rival attorney numerous documents and interview transcripts associated with an investigation of the improper floor trading.

Rakoff also authorized that lawyer, Dominic Amorosa, to seek a court order that would force the SEC to clarify whether its former New York regional director, Carmen Lawrence, violated federal ethics laws through her involvement in the floor-broker case. (

TSC

wrote about the debate over Lawrence's

job switch.)

Amorosa, who is representing former floor broker John D'Alessio, vowed to continue fighting to prove his client is innocent because the NYSE allegedly condoned the type of profit-taking that took place by brokers on its trading floor.

"What D'Alessio wants to be able to prove was that he acted in good faith," Amorosa said during Monday's hearing. "We want to prove that most everybody on the floor, most members were themselves aware" of the trading.

A Big Board spokesman declined to comment on Rakoff's verbal rulings Monday evening, citing related cases that are still pending.

Rakoff's decisions spell a significant legal victory for the NYSE and may go a long way in fighting lawsuits from two other floor brokers suing the exchange over the scandal.

The judge affirmed the Big Board's longstanding contention that it is immune from civil lawsuits over its enforcement activities because of its status as a quasi-governmental regulatory organization, and tossed out D'Alessio's claim for $22.5 million.

The issue of the illegal floor trading, which has been a black eye for the exchange since it surfaced two years ago, is far from over.

The SEC is continuing civil lawsuits against several floor brokers, including D'Alessio, who is charged with violating securities laws by trading for personal profit on the exchange floor.

Amorosa is seeking to question numerous high-ranking NYSE officials about the floor-trading practices, including the exchange's chairman, Richard Grasso. But the NYSE's lawyer in the floor-trading matter, Harvey Pitt, objected to Amorosa's effort to force Grasso into a deposition.

Pitt, a prominent New York securities defense lawyer with the firm

Fried Frank Harris Shriver & Jacobson

and the former SEC general counsel, said Amorosa's strategy had to do "with making people pay for taking enforcement action against his client -- persecuting the prosecutor, if you will."

Rakoff decided Amorosa could not immediately take a deposition of Grasso, but agreed to let him question other NYSE officials and members and let him continue pressing his concerns about the actions of former SEC official Lawrence.

In a letter earlier this month, Amorosa said Lawrence may have violated federal ethics laws because she headed the SEC's regional office when it filed charges against D'Alessio and also negotiated to take a job as a partner at Fried Frank, the firm representing the NYSE in the floor-trading matter.

The SEC officially maintains Lawrence broke no ethics rules related to the floor-trading investigation.