Former Eagles linebacker Mychal Kendricks stood before a federal judge in a Philadelphia courtroom Thursday afternoon and pleaded guilty to leveraging insider stock tips to fatten his already enviable financial portfolio.

Kendricks, 27, who helped the Eagles win the Super Bowl last season before signing with the Cleveland Browns, admitted to swapping cash, NFL tickets, and access to lavish parties with a Wall Street-connected friend for nonpublic market-shifting information.

At the end of their two-year scheme, Kendricks had profited close to $1.2 million.

U.S. District Judge Gene E.K. Pratter asked Kendricks why he was pleading guilty.

"Because I know I was wrong," he said. "I know that I made the decision to accept information, secret information, and it wasn't the right thing to do."

The judge said she wanted to be sure that Kendricks was not coerced into pleading guilty.

"I'm making the decision because it's the right thing to do," he said.

Prosecutors said Damilare Sonoiki, 27, a Harvard-educated Goldman Sachs analyst turned sitcom writer, fed Kendricks confidential financial information on four companies that were about to be absorbed in mega-deals that sent their stock prices soaring.

Sonoiki's lawyer, Mark T. Wilson of the Federal Community Defender Office in Philadelphia, said in an email that his client also would plead guilty, but no date has been set.

According to court documents, the two co-defendants began scheming shortly after meeting at a party in late 2013, around the time Kendricks entered his rookie season with the Eagles.

Between 2013 and 2015, Sonoiki provided Kendricks with advance notice of mergers and acquisitions that he learned about while working in the technology, media, and telecommunications division at Goldman Sachs.

In exchange, Kendricks paid Sonoiki more than $10,000 in kickbacks, gifted him Eagles tickets, and invited him to nightclub promotions and to the set of a music video featuring pop star Teyana Taylor.

Sonoiki left the financial sector in 2015 and landed a TV writing role with ABC's Black-ish for the 2015-16 season. He began working as a writer for Fox's The Simpsons this year.

During six seasons with the Eagles, Kendricks was paid more than $20 million, according to sports finance website Spotrac. In June, he signed a one-year, $500,000 contract with the Browns, but he was released last week after news of the charges broke.

Lawyers said Thursday that although federal sentencing guidelines are likely to call for a term of imprisonment, any sentence he receives is likely to be far less than the statutory maximum of 25 years — in part because of Kendricks' decision to plead guilty before an indictment.

Michael Schwartz, Kendricks' attorney, did not say Thursday whether he would seek a sentence of probation at his client's sentencing hearing Dec. 18.

Staff writer Jeremy Roebuck contributed to this article.