The Game has pleaded no contest to a felony charge of possession of a firearm in a school zone.
After he entered his plea, a Los Angeles County judge immediately sentenced him to 60 days in jail, 150 hours of community service and three years probation.
The rapper, whose real name is Jayceon Taylor, faced three felony counts for making criminal threats and exhibiting a firearm in the presence of a peace officer. Two counts were dismissed as part of a plea agreement.
In February 2007, Taylor allegedly got into a heated altercation with a player from an opposing team during a pick-up basketball game at a school in South L.A. After allegedly punching the other player, prosecutors said Taylor then pulled a gun from his Escalade and threatened to shoot the victim.
He has until March 3 to turn himself in.