Keshav Mukund Bhide, a 23-year-old University of Washington student, has been charged in federal court for posting online threats to kill women and for praising the gun massacre in May. If convicted, Bhide faces up to five years in prison.

Bhide was detained on suspicion of harassment and cyber stalking Saturday and charged with "making interstate threats" on Thursday.

Police officials said that Bhide's online comments on YouTube and Google+ between May 31 and June 9 included admirations for 22-year-old California gunman Elliot Rodger. It also featured threats to inflict serious physical injury or kill women at the University of Washington and two other women.

Excerpts of Bhide's comments:

"Everything Elliot did is perfectly justified," Bhide wrote under an account with the name "Foss Dark." Replying to one of the Internet user, he said, "I live in Seattle and go to UW, that's all (I'll) give you. (I'll) make sure I kill only women, and many more than what Elliot accomplished," Bhide wrote in a June 9 post, Chicago Tribune reports.

Emily Langlie, a spokeswoman for the U.S. Attorney, said that authorities did not find any weapon at his dormitory in the university's Seattle campus.

An FBI special agent said in a federal complaint, "Bhide stated that he, like Rodger, had a hard time socializing at school and had few friends."

Earlier this week, local prosecutors declined to press charges against Bhide. They claimed that the threatening Internet comments were a violation of U.S. law as it travelled out of state.