The court heard how Jaylani and the victim, who was 14 years old at the time, were known to one another.
Detective Sergeant Dean Trollope, who oversaw the investigation, said: “Jaylani has shown himself to be a dangerous individual. The victim was terrified and she suffered significant injuries as a result of the vicious assault.
“Since the attack, the victim has been safeguarded by specially-trained officers and received help from Beacon, our victim support service. I hope Jaylani’s conviction and resulting restraining order have provided her with some closure, and she can now begin to move forward with her life.”