A teacher in his late 30s at a prefectural high school here resigned in November after a female student complained to the school about the persistent and sexual nature of e-mails he was sending her, the prefectural government and school said Wednesday.

The teacher, whose name was withheld, began sending e-mail messages to the student from his mobile phone in July, starting with invitations for meals but later containing content of a sexual nature, according to the prefectural government's high school education department.

In late October, the student consulted a staff member at the school about the matter before taking several days off in early November to avoid the teacher, according to the education department.

The prefectural government, which looked into the case after receiving a report from the school, found the teacher had also been exchanging e-mail messages with female students from other classes and ordered him to stay at home.

In late November, the teacher submitted his resignation, which was accepted, it said.

"The safety of the student, which should be protected most, was not protected," the school principal said. "I am very sorry for the student."