A man who sent abusive messages to Chris Martin and British Tv personality Rachel Riley has been sectioned under the U.K.'s Mental Health Act.

Anthony Wells, 31, sent the Coldplay rocker and game show star Riley sexual and abusive message via social networking site Twitter.com from October, 2012 to May, 2013.

At Basildon Crown Court in Essex, England on Friday (30May14), Wells pleaded guilty to one charge of harassing Riley with tweets but denied a similar charge involving Martin.

His charge of alleged harassment of the rocker was left to lie on file after Martin agreed to accept the ruling to "ensure he (Wells) gets the medical help he needs," according to a spokesman for Britain's Crown Prosecution Service.

Judge Owen Davies, Qc ordered Wells to be sectioned for treatment under the Mental Health Act, and also imposed a five-year restraining order on him, banning him from contacting Martin and Riley.