Sebastian Telfair has been sentenced to 3 1/2 years in prison. (Getty)

Former NBA player Sebastian Telfair has been sentenced to 3 1/2 years in prison for a gun charge stemming from a 2017 traffic stop in Brooklyn.

Brooklyn District Attorney General Eric Gonzalez announced the sentence on Monday. Telfair was found guilty on a charge of felony criminal possession of a weapon on April 24.

Police say Telfair drove away with his headlights off when they approached his car in June 2017 when it was parked illegally on a median.

Police searched car after smelling marijuana

Police say they smelled marijuana and saw a lit blunt in the car and conducted a search. During the search, police said they found marijuana, a bullet-proof vest, three handguns, a semiautomatic rifle and ammunition in Telfair’s car.

BREAKING: @NBA star Sebastian Telfair arrested in BK with semi-automatic gun, loaded guns, loads of ammunition and marijuana, PD sources pic.twitter.com/6hdhSdyXlS — Myles Miller (@MylesMill) June 11, 2017

Telfair convicted by jury

Telfair pleaded not guilty, but was convicted by a New York jury and reportedly faced up to 15 years in prison on the weapons charge.

This was Telfair’s second gun conviction. Telfair pleaded guilty in 2007 to a gun possession charge when police found a loaded handgun under his car seat during a speeding stop. Telfair was sentenced to three years probation and suspended three games by the NBA.

The Portland Trail Blazers drafted Telfair with the 13th pick in the 2004 NBA draft straight out of high school. He never lived up to his lofty hype as a top New York city point guard prospect, but did carve out a 10-year NBA career, playing until 2015 with eight different teams.

More from Yahoo Sports: