Ryan Seacrest's stalker, Chidi Uzomah, just pled no contest to felony stalking ... TMZ has learned.
Uzomah, who repeatedly hunted the "American Idol" host down and came close to him while armed with a knife, agreed in court to submit to a 3-month psychiatric evaluation at Chino State Prison in California.
As for prison time, we're told he could serve up to two years behind bars. And it's likely the judge will issue a criminal stay away order to keep Uzomah clear of Ryan Seacrest for the next 10 years.
People who worked on the case say the L.A. County Deputy D.A. assigned to the case, Wendy Segall, drove a hard bargain.