A former Amazon financial analyst pleaded guilty on Thursday to insider trading for leaking confidential information about the company to his college fraternity brother.

Brett Kennedy, a 26-year-old ex-Amazon (AMZN) worker, was accused of giving secret financial information to his University of Washington pal, Maziar Rezakhani, ahead of an Amazon earnings release in 2015, federal authorities said Thursday.

Rezakhani, 28, then used the information to make stock trades that netted him $116,000 in illegal profits, the Securities and Exchange Commission said in a press release. He also shared the profits with his financial adviser, Sam Sadeghi, 28, and gave Kennedy "$10,000 in cash for the tip," the agency alleged.

All three people are named in the complaint from the Securities and Exchange Commission.

The agency said Rezakhani "aimed to establish a successful track record with the trading" in hopes of attracting investors for a New York hedge fund he planned to open with Sadeghi, who was working as an engineer at the time.

Related: Senators say Trump adviser Icahn may have broken trading laws

Rezakhani also boasted on social media that he could accurately predict Amazon's financial performance, SEC said. "He failed to predict that we would catch him and his accomplices in their illegal scheme,"said Jina L. Choi, the SEC's San Francisco office director.

Amazon declined to comment for this story.

Kennedy, of Blaine, Washington, pleaded guilty to criminal charges related to the matter, according to the Department of Justice. Prosecutors are recommending he serve no more than a year and a day in prison, according to a release.

"However, the judge is not bound by that recommendation and Kennedy could be sentenced to the maximum penalty of up to 20 years in prison and $5 million fine," the Justice Department said.

Kennedy's lawyer, Chris Black, said in a statement that Kennedy "exercised very poor judgment in this case but it was a one-time incident." Black said his client has been "very cooperative" with authorities.

He added that Kennedy, who was 24 -years-old in 2015, "was little more than a kid" at the time and "has taken responsibility for his actions and looks forward to putting this chapter in his life behind him."

To settle matters with the SEC, Kennedy has agreed to pay a fine of about $10,900.

Sadeghi, without admitting or denying the allegations, agreed to pay about $24,000, the federal agency said. Both settlements still need court approval.

Sadeghi, a resident of New Castle, Washington, could not immediately be reached for comment about the settlement.

The SEC's case against Rezakhani will continue. Rezakhani is currently serving a five year prison term "for defrauding a bank, Apple, Inc., and various shipping and insurance companies," the Justice Department said.

Representation for Rezakhani could not immediately be reached for comment on the allegations from the SEC regarding Amazon.

The attorney that represented him for at least a portion of the case for which he is currently serving prison time said he no longer represents Rezakhani. Public records show he is scheduled to be released in December 2020.