NEW YORK (AP) — Michael Avenatti, the combative lawyer who gained fame by representing porn star Stormy Daniels in lawsuits involving President Donald Trump, was convicted Friday of trying to extort sportswear giant Nike.

The verdict was returned by a federal jury in Manhattan following a three-week trial in which prosecutors said Avenatti threatened to use his media access to hurt Nike’s reputation and stock price unless the company paid him up to $25 million.

The convictions for attempted extortion and honest services fraud carry a combined potential penalty of 42 years in prison.

Avenatti glared at the jurors as the verdict was being announced but said nothing.

Afterward, he shook hands with his lawyers and told them “great job” before he was led back to the cell where he has been held since a judge found he had violated his bail conditions.

His lawyer, Scott Srebnick, said he would appeal the conviction but otherwise declined to comment. A judge set sentencing for June.

The jury agreed with prosecutors who argued that Avenatti misused a client’s information “in an effort to extort tens of millions of dollars” from Nike, U.S. Attorney Geoffrey S. Berman said in a written statement.

“While the defendant may have tried to hide behind legal terms and a suit and tie, the jury clearly saw the defendant’s scheme for what it was — an old fashioned shakedown,” he said.

At trial, lawyers for Nike used words like “shakedown” and “stickup” to describe what they felt they were subject to when Avenatti threatened to stage a news conference to muddy Nike’s name by linking the company to a college basketball scandal.

Avenatti, 48, became a cable news fixture in 2018 and 2019 as journalists courted him for information about Daniels and her claims of a tryst with Trump before he became president, and a payoff to remain silent about it. At his peak of notoriety, Avenatti used Twitter and TV appearances to relentlessly criticize Trump and even considered running for president himself.

Many of his appearances occurred while he was representing Daniels and after the arrest of Trump’s personal lawyer, Michael Cohen. Cohen is serving a three-year prison sentence after pleading guilty to lying to Congress and campaign finance violations in connection with hush payments to Daniels and another woman who claimed an affair with Trump.

After Avenatti’s conviction, Donald Trump Jr. said in a tweet: “I look forward to Michael’s witty twitter retorts to the jury that just found him guilty in all counts. Though I’m told he is still doing well amongst the Democrat primary contenders.”

The president’s son also sent a tweet with snippets of some of Avanatti’s television appearances and suggested the media loved Avenatti.

Avenatti’s fall was swift. He was arrested as he was about to meet Nike lawyers last March to press his demands for millions of dollars to conduct an internal probe of the Beaverton, Oregon-based apparel maker. Evidence at trial showed Avenatti owed at least $11 million at the time and had been evicted from his law offices for failure to pay rent that totaled roughly $50,000 a month.

Avenatti maintained he was taking the aggressive position at the urging of his client Gary Franklin, who ran a youth basketball league in Los Angeles and was angry that Nike ended a decade-long sponsorship that provided $72,000 annually and free gear. He sought $1.5 million for Franklin, as well.

Franklin testified that two Nike executives forced him to pay money to the mother of an elite high school basketball player and to pass along payments to the handlers of other players while doctoring paperwork to hide the purpose of the funds.

Franklin said he felt betrayed by Avenatti after he learned the lawyer was demanding millions of dollars for himself and another lawyer. He also said he would not have approved of Avenatti threatening to smear Nike’s name, since he wanted to repair his relationship with the company.

“Scared, upset, confused” was how Franklin said he reacted to Avenatti telling him that he was “going to go public” with what he knew about Nike executives.

As Franklin testified, Avenatti showed his displeasure. He laughed, grimaced, looked skyward, smiled and shook his head in reaction to his former client’s testimony.

Avenatti did not testify, but his lawyers said he was following the wishes of Franklin and an entertainment executive who advised him to be aggressive to force Nike to fire corrupt executives and fix its culture.

Besides the extortion trial, Avenatti also faces an April trial in New York on charges that he defrauded Daniels of book proceeds and a May trial in Los Angeles on charges that he defrauded clients and others of millions of dollars.

The judge presiding over the trial over book proceeds died this month. The judge newly assigned to the case has scheduled a conference for Feb. 25.

Avenatti remains held without bail. Federal prosecutors in Los Angeles succeeded last month in getting him locked up after saying he violated his $300,000 bail by moving money around illegally after his arrest.