The 31-year-old could face life in prison if found guilty. He did not appear in front of the judge, but could be seen off to the side of the courtroom with his head down, next to his public defender. He was charged with four felony counts that include false imprisonment and the intent to commit rape.
"Grabbing random strangers and trying to rape them, (I) can't think of anything more scary than that," said Bret Wasley with the Santa Clara County District Attorney's Office.
There's a protective order now in place that prevents him from coming 100 yards of either victim.
Police say home surveillance video helped catch Khaliqi. The video shows him following a 13-year-old girl as she walked home from school last Tuesday, and then forcing his way into the house before attacking her. He took off after the girl managed to hit him in the face.
A month earlier, police say he tried to rape a woman at Mitsuwa Market.
Both attacks were close to the defendant's home in west San Jose.
"A person who he rented a room from saw the videos on TV and said that looks like this guy, so he went to police and an investigation led to tracking him down in San Leandro," said Wasley.
ABC7 News spoke to his roommate last week, who said he was shocked to learn the news and added that Khaliqi had abruptly moved out a day after the most recent attack.
Neighbors are relieved a suspect has been caught.
"I think it's pretty good that he's put away," said San Jose resident Derek Lau.
Fellow resident Dale Abrams added, "If he actually did what he's being accused of, then it's definitely better that he's off the street."
Detectives are still working on gathering more evidence with the potential for more victims to come about.
Kahliqi is now back in custody. He will be back in court May 19.