HARRISBURG, Pa. (Reuters) - A Chinese student attending Lehigh University in Pennsylvania has been arrested and charged with attempting to murder his roommate of four years with a component of rat poison he ordered online, prosecutors said.

Yukai Yang, 22, who is in the United States on a student visa, is to appear in court next month to face charges that he put thallium, a component of rat poison, in the milk and mouthwash of his roommate, Juwan Royal, who is black, according to charging documents.

Yang had already been under investigation for charges of ethnic intimidation for allegedly scrawling a racist message on Royal’s desk and damaging his TV last spring, shortly after authorities believe he began trying to poison Royal.

The pair had been roommates since freshman year and Yang graduated last spring.

“He experienced extreme pain in his lower extremities as well as burning and numbness,” Northampton County District Attorney John Morganelli said of Royal in a news conference on Thursday. “He required intensive medical treatment.”

Yang’s lawyer, Janet Jackson, could not be reached for comment. Lehigh University spokeswoman Lori Friedman said the university cooperated closely with the district attorney but could not comment further because of federal student privacy law. She did say that Royal has not graduated.

Lehigh University police said in charging documents that Yang, a chemistry major, admitted to ordering thallium online, but insisted it was to poison himself if he did poorly in his exams.

Blood tests confirmed that Royal had ingested thallium, a nerve agent that also damages the lungs, heart, liver and kidney, after multiple unexplained incidents of illness in March.

Yang was ordered held in Northampton County Prison under $200,000 bail. He is due in court on Jan. 3.