Patrick Dai pleaded guilty to posting a series of messages in which he threatened to stab, rape and behead Jewish people.A former Cornell University student pleaded guilty on Wednesday to posting a series of online messages shortly after the war in Gaza began last fall in which he threatened to stab, rape and behead Jewish people, federal prosecutors said.The former student, Patrick Dai, pleaded guilty to posting threats to kill or injure another person using interstate communications, according to federal prosecutors with the U.S. attorney’s office for New York’s Northern District.Mr. Dai, 21, who is originally from Pittsford, N.Y., is scheduled to be sentenced in August and faces up to five years in prison and a fine of up to $250,000, prosecutors said.“This defendant is being held accountable for vile, abhorrent, antisemitic threats of violence levied against members of the Cornell University Jewish community,” Kristen Clarke, an assistant attorney general in the Justice Department’s Civil Rights Division, said in a statement.Lisa Peebles, a federal public defender representing Mr. Dai, did not immediately respond to a request for comment. In an interview with WHEC, a local television station, outside the federal courthouse in Syracuse, N.Y., on Wednesday, she said the threats were a product of a “bad decision” over “a bad couple of days.”“He’s very remorseful,” she said. “He accepts responsibility.”A university spokesman declined to comment on the plea.Mr. Dai was a junior majoring in computer science when he made the threats. In pleading guilty, he admitted to posting them anonymously on Oct. 28 and Oct. 29 in the Cornell section of an online discussion forum about fraternity and sorority life, prosecutors said.The threats included saying he was “gonna shoot up” a kosher dining hall on the Cornell campus and was “gonna bomb” a Jewish residence there, prosecutors said.In one post, prosecutors said, he threatened to “stab” and “slit the throat” of any Jewish man he saw on campus; to rape and throw off a cliff any Jewish women; to behead Jewish babies; and to “bring an assault rifle to campus” and shoot Jews.The F.B.I. traced the threats to Mr. Dai through an IP address, and he admitted they were his in an interview with federal agents, according to a criminal complaint.The threats came amid a surge in antisemitic and anti-Muslim rhetoric across the United States, including at colleges and universities, after the war in Gaza began in October. Gov. Kathy Hochul of New York and Doug Emhoff, Vice President Kamala Harris’s husband, traveled to Cornell’s Ithaca campus to show support for rattled students. Cornell canceled classes for a day.Mr. Dai’s mother, Bing Liu, told The Associated Press in November that she believed the threats were partly the fault of medication her son had been taking for depression and anxiety.She told The A.P. that her son’s depression had prompted her to bring him home on weekends, that he was home the weekend the threats were made and that he had previously taken three semesters off. More