ALBANY – Former New York Knicks basketball players J.R. Smith and Al Harrington made a surprise appearance in Albany on Tuesday to push for pot to be legalized before the plan goes up in smoke at the end of the legislative session.

The New Jersey-born hoops stars were invited by Assembly Majority Leader Crystal Peoples-Stokes (D-Buffalo), who is the sponsor of the recreational marijuana legislation, with the suspected tokers lending star power to the dying legislation.

Harrington told The Post that he and Smith had “expertise” in both medical and recreational marijuana and were pushing for black communities to be included in the proposed legislation.

There are fears the bill will be snuffed out unless lawmakers can come to an agreement before the end of the legislative session on June 19.

“It’s been very positive,” Harrington said of his meetings with legislators. “You know this is something that they want, but they want to do it the right way.

“We met with a bunch of different assembly members and senators, legislators and just kind of just giving our opinion from our perspective being that we’re black.

“We feel that it’s very important that we need to have the seat at the table so we can use some of these funds to rebuild our communities.”

Harrington has become a weed mogul in retirement and now runs Viola, a cannabis company that sells cannabis and vape pens and employs 70 people in four states.

In April, Gov. Andrew Cuomo insisted New York would pass a law to legalize recreational pot before the Legislature adjourns in June.

But this week he retreated on those claims, blaming state lawmakers for getting cold feet.

Sen. Liz Krueger (D-Manhattan) and Peoples-Stokes released a reworked pot bill, which included measures such as expunging of low-level marijuana convictions, but it was dropped from the state budget on April 1.

Some lawmakers continue to hold out, including Long Island Senate Democrats such as Todd Kaminsky (D-Suffolk), who is particularly concerned about tokers driving under the influence.

Smith, who now plays for the Cleveland Cavaliers, is a reported toker and was suspended by the NBA for five games in 2013 after he tested positive for marijuana.

While a leading scorer for the Knicks, Smith often made headlines for his volatile behavior.

He was suspended for one game in March 2018 after he threw a bowl of soup at Cavaliers assistant coach Damon James and has served suspensions for fighting on court (10 games) and reckless driving (seven games).

Speaking to the Indianapolis Star in February, Harrington explained how he discovered the benefits of medical marijuana after undergoing 14 surgeries as a player.

“I firmly believe that [medical marijuana] will be allowed in one of these major sports leagues in the next two years,” Harrington told the Star.

The 39-year-old athlete from New Jersey blasted professional sports leagues for “prescribing opioids and giving prescription pills and shooting these NFL players up to be able to go compete.”

“They walk away from the game and their quality of life [expletive] sucks and if cannabis can help them and give them quality of life, they should look into it,” he said.