Sebastian Telfair is shown in 2014 with the Oklahoma City Thunder, his final NBA stop. (Alex Goodlett/Getty Images)

Former NBA player Sebastian Telfair, who went straight to the league after a high-profile high school career, was sentenced Monday to 3½ years in prison for gun possession.

Telfair, 34, was arrested in New York in 2017 after being pulled over in his vehicle, at which point, police said, they found a cache of firearms and ammunition. He was convicted in April on a charge of second-degree criminal possession of a weapon and faced a sentence of up to 15 years.

At his hearing Monday in Brooklyn Supreme Court, a reportedly agitated Telfair said: “Please don’t take me from the society right now. I’m 34. I can go play in China for another six years, take care of my family.”

Brooklyn District Attorney Eric Gonzalez, in a statement, said: “The mandatory prison sentence he received today is required by law and he has now been held accountable for the unlawful conduct.”

Telfair’s NBA career began in 2004, when he was drafted 13th overall by the Portland Trail Blazers directly out of Brooklyn’s Abraham Lincoln High, where he enjoyed a legendary career and earned national player of the year honors. As an undersized point guard in the pros, he stuck around for 10 years but struggled to make a major impact, averaging 7.4 points, 3.5 assists and 1.6 rebounds.

That was a far cry from the hullabaloo Telfair generated in his teenage years, including appearing on the cover of Slam magazine in 2002 with fellow high school star LeBron James. That pair was “about to rule the world,” the magazine blared.

In 2004, Telfair was featured on the cover of Sports Illustrated, and over the next two years his experiences inspired a book and a documentary.

A cousin of fellow New York point guard Stephon Marbury, Telfair never approached Marbury’s level of success in the NBA, as he bounced from Portland to the Boston Celtics, Minnesota Timberwolves, Los Angeles Clippers, Cleveland Cavaliers, Phoenix Suns, Toronto Raptors and Oklahoma City Thunder.

Along the way, he was involved in a pair of weapons-related incidents, including a 2007 arrest on a gun possession charge after he was pulled over for speeding in Yonkers, N.Y. The Trail Blazers fined Telfair in 2006 after a loaded gun was found on a team plane, reportedly in a pillowcase belonging to him.

Of the 2007 arrest, which led to a sentence of three years’ probation, Telfair told Sports Illustrated in 2013 that he had the gun for “no particular reason or particular situation,” adding: “Just having it, being dumb. … If I was thinking about, I want to make sure I’m getting a contract and be an all-star, [then] for no reason would I have a weapon, at no point in time.”

“I kind of ruined my career with that,” Telfair said then. “It was a bad move all around. But I don’t beat myself up about it too much.”

On Monday, he complained in court that he was being penalized too harshly for a “victimless crime.”

“The judgment in this case sir, is what the jury convicted you of,” Judge John Hecht told Telfair. “You’ve achieved greatness in your life, and this case doesn’t take that away.”

Sign up for our weekly NBA newsletter to get the best basketball coverage in your inbox

Read more from The Post:

NBA 2019-20 schedule takeaways: Load management for fans, Zion Williamson takeover and more

Five takeaways from the Wizards’ 2019-20 schedule

‘Irreplaceable’ items stolen from Alex Rodriguez in rental car theft