A Gilroy prep school teacher was arrested on suspicion of having a sexual relationship with 17-year-old student, officials said.

William Dawson, a 32-year-old Los Gatos resident, was taken into custody last week, three months after the Santa Clara County Sheriff’s Office launched a criminal investigation into the alleged relationship with the female student.

Through interviews, investigators determined that the relationship occurred during the 2014 to 2015 school year when Dawson was 30 and the student had just turned 17 years old.

Dawson was arrested on Feb. 22 and booked into Santa Clara County Main Jail on seven felony charges, including multiple counts of lewd and lascivious acts with a minor, multiple counts of unlawful sexual intercourse and one count of distribution of harmful matter sent to seduce a minor.