YPSILANTI, Mich. (AP) — Emoni Bates was reinstated to the Eastern Michigan basketball team and as a student Thursday after prosecutors agreed to drop felony charges against him, his attorney and the school said.

The 18-year-old Bates was a top prospect out of high school who transferred to Eastern Michigan in August after playing his freshman season at Memphis. He was charged after police found a gun in a car he was driving last month. Defense attorney Steve Haney said the vehicle and the gun didn’t belong to Bates.

Bates was “immediately reinstated to all athletic and campus activities” because of the agreement between prosecutors and Bates’ attorneys, the school said in a statement, adding that the move was made in accordance with athletic department policies.

Bates was charged with two felonies — carrying a concealed weapon and “altering ID marks” — on Sept. 19 after a traffic stop. Bates failed to stop at an intersection and a search turned up the weapon, the Washtenaw County sheriff’s office said. He pleaded not guilty at his probable cause hearing last week.

Bates will plead down to a misdemeanor charge, Haney said. A hearing was scheduled for next Wednesday. Bates also must complete a diversion program to have his record expunged.

Bates attended Eastern Michigan’s practice on Thursday, the Detroit Free Press reported.

The 6-foot-9 guard will play for his hometown school after averaging 9.7 points and 3.3 rebounds last season as a freshman at Memphis, where he enrolled after reclassifying to skip a year of high school.

Bates became the first sophomore to win the Gatorade national player of the year award in 2020, beating out Cade Cunningham and Evan Mobley. The Detroit Pistons drafted Cunningham No. 1 overall last year, two spots before Cleveland took Mobley in the draft.

Bates initially committed to playing for Tom Izzo at Michigan State. He later de-committed and signed with Memphis and coach Penny Hardaway. Bates played in 18 games for the Tigers, missing several weeks with a back injury.

In 2019, as a high school freshman, the slender and skilled guard led Ypsilanti Lincoln to a state title and was named Michigan’s Division 1 Player of the Year by The Associated Press. His sophomore season was cut short by the COVID-19 pandemic and he attended Ypsi Prep Academy as a junior, his final year of high school.