Jesus Gabriel Lares was arrested at Valley High School immediately following the incident.
According to authorities, Lares attempted to come on to the victim during lunch but the girl told Lares she had a boyfriend and rebuffed his advances.
Officials said the 17-year-old victim was walking past the girls' bathroom after lunch when Lares pulled her into the boys' bathroom. The suspect then began kissing the girl and attempted to take her clothes off.
"He grabbed her by the arm and pulled her into the boys' bathroom and then shut the door," said Lt. Paul Vernon, commanding officer of the Mission Detective Division. "That's when he started kissing her and attacking her and trying to disrobe her."
The assault came to a halt when another student knocked on the bathroom door and interrupted. The victim was then able to leave. She told a teacher what happened once she was separated from Lares and police were called.
"The girl was not physically injured, but she was clearly upset by the surprise attack," said Lt. Vernon. "Moving a victim during a crime and holding her against her will is enough to constitute kidnapping. Injury or not, this is a very serious crime."
Lares was booked for kidnap with the intent to commit rape. He is being held on $1 million bail.
Both the victim and Lares are clients of Penny Lane, a children's social services facility, which also includes Valley High School, a private continuation school for grades 7 through 12.
Anyone with any information regarding the assault was urged to contact Detective Luz Montero of the Mission Sex Unit at (818) 838-9975. People who wish to remain anonymous can call the LAPD Crimestoppers tipline at (800) 222-TIPS or (800) 222-8477.