It appears Mikey Williams, the basketball phenom and social media star, won’t be going to prison. 

Williams entered a plea deal Thursday, admitting guilt to a single felony count of making a criminal threat in an April shooting outside his home in California, San Diego County District Attorney’s Office spokesman Steve Walker told Yahoo Sports. 

Williams, 19, will be required to complete 80 hours of community service and attend cognitive behavior therapy, gun safety and anger management classes as part of the plea deal. 

CLICK HERE FOR MORE SPORTS COVERAGE ON FOXNEWS.COM

Mikey Williams dribbles

Mikey Williams (1) of San Ysidro drives to the basket during the Hoophall Classic high school basketball game against Christopher Columbus Jan. 14, 2023, at Blake Arena in Springfield, Mass (John Jones/Icon Sportswire via Getty Images)

If Williams completes his sentence successfully and stays out of trouble, the felony will be reduced to a misdemeanor. 

Williams was arrested April 13 after an incident two weeks earlier at his home. The basketball star was angered with visitors showing up to his home and brought out a gun, allegedly threatening to shoot.

HIGH SCHOOL BASKETBALL STAR MIKEY WILLIAMS PLEADS NOT GUILTY TO FELONY GUN CHARGES

As a vehicle with visitors inside drove off, Williams allegedly shot a handgun at the vehicle, hitting the trunk and rear windshield. No one was hurt in the shooting. 

He was facing six counts of assault with a firearm — one count for each occupant in the vehicle — one count of firing into an occupied motor vehicle and two counts of making threats that could result in death or great bodily injury. 

Combined, the charges carried up to 30 years in prison if Williams was found guilty on all of them. 

Mikey Williams shoots the basketball

Mikey Williams (1) of San Ysidro shoots the ball during the Hoophall Classic high school basketball game against Christopher Columbus Jan. 14, 2023, at Blake Arena in Springfield, Mass. (John Jones/Icon Sportswire via Getty Images)

"I feel good, brother. You know, all glory to God. I’m just happy that I made it out of this situation. But I’m just excited to get back to the court," Williams said after leaving a courthouse, according to Overtime. 

Williams committed to play at the University of Memphis, though he hasn’t been at any practices or games this year. He was, however, enrolled in online classes and is on the roster. 

A Memphis spokesperson told Yahoo Sports the university had nothing "new at this time."

Williams gained stardom before even touching his high school court at San Ysidro High School in San Diego. He gained over 1 million social media followers and quickly became a target for NIL deals, signing a groundbreaking endorsement with Puma. It was the first time an American high school basketball player inked a sneaker deal. 

Mikey Williams looks on during a game

Mikey Williams during the Pangos All-American Camp June 7, 2022, at Bishop Gorman High School in Las Vegas. (Brian Rothmuller/Icon Sportswire via Getty Images)

CLICK HERE TO GET THE FOX NEWS APP

Williams' team lost 13 games his senior season, and his ranking in the Class of 2023 fell to No. 71 overall in the country, according to Rivals.