A 15-year-old junior high school student in Nagaoka, Niigata Prefecture, who hacked into a school server to alter his grades has admitted to stealing an ID and password needed to access the server from a computer he borrowed from his teacher, the school's principal said Thursday.

The Niigata Prefectural Police on Dec. 4 sent the case to prosecutors on suspicion the student violated the law prohibiting unauthorized computer access, investigative sources said.

According to the school's officials, the student borrowed his teacher's computer in June to make a slide show. While the teacher was not looking, the third-year student obtained an ID and other information using an app. He also changed the settings of a school tablet, which has access to the school's server meant only for teachers, to enable him to remotely control the tablet via his own device.

The server intrusion occurred in October when the student remotely accessed the tablet, bumped up his grades and handed the printout of the doctored version to his parents. The server also contains data on all students, including attendance records and who they are friends with.

The school said the student showed remorse, saying, "I hesitated but my curiosity overcame that feeling and I couldn't stop myself. I wanted to make my grades look better."