Former California State University, Bakersfield assistant basketball coach Kevin Mays has taken a plea deal in his pimping and child pornography case. 

Mays pleaded no contest to pimping, possession of child pornography and possession of a controlled substance with a firearm on Wednesday. 

Driving the news: Mays was arrested last year after an anonymous tipper accused the former coach of sex trafficking and possessing child pornography. 

The tipster made the allegations to former CSUB Head Basketball Coach Rob Barnes, claiming that Mays trafficked a woman throughout California, Washington, Oregon and Nevada. 

Flashback: Mays appeared in court in March for a two-day hearing that preceded a potential trial. 

Eight people testified in the hearing, leading Judge Eric Bradshaw to order a trial at the time. 

Prosecutors had accused Mays of possessing more than 600 images of child pornography and over having two dozen videos on his phone that depicted sexual conduct with a minor. 

A Sacramento Police Department detective also testified in the hearing that Mays paid for hotels and flights for a woman that he was pimping out. 

Zoom in: Prosecutors dropped eight of the charges as part of the plea deal, leaving the pimping, possession of child pornography and possession of a controlled substance with a firearm charges in place for Mays’ no contest plea. 

What we’re watching: Mays will return to court on July 30 to be sentenced. 

Mays is facing four years in prison and will have to register as a sex offender for life.