Sheldon Silver’s attorney agrees that it was “distasteful” of the former Assembly speaker to get rich off people who stood to benefit from the power of his office — but, he told jurors, that doesn’t make it a crime.

“Distasteful is not criminal. A conflict of interest is not a criminal offense,” defense lawyer Michael Feldberg told a Manhattan federal jury in opening statements at Silver’s corruption retrial Monday.

The blunt tactic appears to be a bet that a narrower legal definition of bribery set forth by the US Supreme Court could set his client free.

“The government must prove much more than that Shelly was not perfect,” Feldberg said of his client, 73, who before his 2015 corruption arrest and conviction was one of the three most powerful men in the state along with the governor and Senate majority leader.

Silver, whose conviction was overturned on appeal based on that Supreme Court ruling, stands accused — for a second time — of selling his office in exchange for $4 million in kickbacks that he received through two law firms with which he was affiliated.

Thanks to the high court decision reversing the bribery conviction of former Virginia Gov. Bob McDonnell, it is no longer illegal for a politician to line his or her pockets off people seeking favors, even if the politician agrees to meetings, lunches or other “non-official acts” in return.

It’s only bribery if the politician does something “official” in exchange for gifts, such as getting legislation passed that benefits the gift giver.

The feds see it differently. In their openings, prosecutors said they will prove Silver engaged in “a decade of corruption and lies” through two agreements.

In the first, he gave $500,000 worth of state grants and other benefits to an asbestos doctor who helped him earn $3 million in asbestos referral fees through mesothelioma-focused law firm Weitz & Luxenberg, for which Silver was “of counsel ” while also leading the Democrat-controlled Assembly.

“Selling your office for $3 million is corruption plain and simple. It’s illegal,” Assistant US Attorney Damian Williams told the jury.

Williams said the government will also prove that Silver helped two real estate firms with legislation in exchange for them moving their tax business to a firm that paid him roughly $800,000 in referral fees.

“He abused his power for personal gain,” and then he lied about it, Williams said.

“Because Silver was on the take, he told lie after lie, he kept secret after secret about how he made his money. No one played that corrupt game better than Sheldon Silver,” Williams said.

Prosecutors later objected to Feldberg’s opening remarks, saying he misinterpreted the law to the jury by claiming that the feds must prove that Silver agreed to provide “specific acts” in return for bribes in order to convict him. The jury only has to find that Silver provided official acts of some kind in order to convict him, Williams complained.

Judge Valerie Caproni agreed and instructed jurors to ignore anyone explaining the law to them — except for herself.