Robert Moffat, once thought to be a leading candidate to become chief executive officer at IBM (NYSE: IBM) has been sentenced to six months in prison for his role in what prosecutors call the biggest hedge fund insider trading case in history.

Moffat pleaded guilty to securities fraud and conspiracy to commit securities fraud earlier this year.

Moffat, 54, was also ordered to pay a $50,000 fine by U.S. District Judge Deborah A. Batts in New York following his guilty plea earlier this year to securities fraud and conspiracy to commit securities fraud.

"White collar crime is just as destructive to our social fabric as the crimes of drugs and violence," the judge said as she sentenced Moffat at the top of a federal sentencing guidelines range that stretched from no jail time to six months in prison.

The case has resulted in charges against 21 defendants. Authorities say profits from illegal trades topped $50 million.

Moffat to commit securities fraud.

Before he was sentenced, Moffat apologized, saying he "made a terrible mistake in judgment which will haunt me the rest of my life."

Moffat admits to having a sexual relationship with Danielle Chiesi, the executive at hedge fund Galleon who is accused of turning information about IBM and AMD that Moffat provided into profits.

Already, a dozen people have pleaded guilty. Charges against Moffat drew increased attention because he was a high-level executive at IBM.

Authorities say profits from illegal trades topped $50 million, though Moffat’s tips resulted in no profits and he received no money, lawyers on both sides agreed.

In a letter to the judge last month in which he asked for leniency, Moffat told the judge the case had exacerbated his wife Amor’s case of multiple sclerosis.

“He said he has been ostracized by former friends and colleagues at IBM and lost $65 million in benefits he probably would have received had he stayed at the company,” the AP reported about the letter.

Moffat also said his relationship with Chiesi wasn’t about money.

Added his lawyers: "That fact that what began as a professional relationship between Ms. Chiesi and himself became intimate is a transgression that haunts Bob terribly” … and Chiesi “manipulated or ‘played’ him to obtain information that she could use."

Prosecutors, however, insisted on jail time.

"As far as the government has determined, his motive was to help a woman with whom he was having an intimate, personal relationship," Reuters reported, citing the prosecutors’ filing in August.

Moffat lives in Ridgefield, Conn.

Prosecutors say his crimes were committed out of a misguided belief he could never be caught.

Get the latest news alerts: at Twitter.

(The Associated Press contributed to this report.)