Sheriff’s deputies arrested Scotlandville Magnet High School’s band director late Thursday night after he was accused of having sex with a student on at least two occasions — one of them consensual and the other allegedly a rape.

A Sheriff’s Office spokeswoman said Robert M. Lewis, 30, is accused of making sexual advances toward a 17-year-old student after he gave her a ride home from a school function in November.

After that, the student and Lewis began exchanging text messages. In late November, when the student’s parents were out of town, Lewis allegedly brought food to the student, said Casey Rayborn Hicks, the spokeswoman.

“Lewis allegedly initiated sex, but the student told him no,” Hicks said. “But Lewis allegedly continued to have sex with the 17-year-old.”

Lewis also is accused of meeting the student at her house, again while her parents were not home, to watch a movie in early December, Hicks said.

“The student stated on this date the two had consensual sex,” Hicks said.

Lewis, of Zachary, was booked into Parish Prison on counts of forcible rape and prohibited sexual conduct between educator and student.

No other information about the incidents was available late Thursday.

In Louisiana, it is illegal for noncollege teachers to have consensual sex with a student who is 17 or older, but younger than 21, when there is an age difference of four years or more between the two people. Generally, the age of consent in Louisiana is 17.

Follow Ben Wallace on Twitter, @_BenWallace.