A Los Angeles man arrested with a knife at the workplace of American Idol host Ryan Seacrest pleaded not guilty to a stalking charge on Tuesday, and was ordered to stay away from Seacrest.

Chidi Uzomah, 25, was told by a Los Angeles judge to stay at least 500 yards from Seacrest and not to attempt to contact him by phone for three years.

Uzomah was arrested on Friday at the Los Angeles offices of entertainment news outlet E!, where Seacrest hosts a morning radio show and a television newscast.

Uzomah faces up to four years in prison if convicted for stalking and a second charge of disobeying a previous stay away order. He was jailed pending a court hearing in two weeks to determine whether he should stand trial.

In September, Uzomah pleaded guilty to attacking Seacrest's security guard outside a charity event, and was later ordered to stay away from the TV and radio celebrity, Los Angeles prosecutors said.