Students take their examination in an exam hall. [Representational Image]Reuters

A class 12 student facing allegations of raping a 15-year-old girl has been allowed to write his Central Board of Secondary Education (CBSE) exams by a trial court in New Delhi.

With the assistance of a lawyer, the teenage boy had appealed to the court and requested if he could write his ongoing board exams, India Today reported.

His lawyer Rishipal Singh told the court that the boy's career was at stake and that he should be allowed to write because he had a 'right to education.'

"While we will support the investigation, it should not hinder the boy's career prospects and bright future. Also, as a matter of right to education, he should be allowed to appear for the exams," Singh was quoted as saying in the court by India Today.

The accused had earlier missed one of his board examinations as he was tied up with the investigations. As his examinations were being hampered, the court allowed him to appear for the remaining exams.

The court asked the student to reach the examination hall on time. The boy's admit card would also be handed over to the school authorities to ensure that he writes the exam.

The court also added that he would be brought back to prison soon after the exam in order to continue with the investigations.

According to the India Today report, the boy had allegedly raped a 15-year-old girl in outer Delhi's Rohini. The victim claimed that the boy and his friend had raped her while she was unconscious.

She was allegedly sedated by the boy with a soft drink laced with drugs.

The unconscious girl woke up naked. She later confronted the boy. However, he allegedly told her that they had "consummated like a husband and wife."

An FIR was filed for rape, causing hurt, criminal intimidation and intoxication, India Today reported.