MERRIMACK, N.H. — A veteran high school English teacher has been accused of seeking naked photos of his 16-year-old student and giving her images and videos of himself performing a sexual act, police said.

Sixty-three-year-old Robert Todd Wiley was arrested Monday on charges of criminal solicitation and endangering the welfare of a child. He’s taught in the Merrimack school district for 37 years.

Police said the girl’s parents found pictures, texts, emails and videos he sent to her. Investigators also allege that Wiley asked the girl for naked pictures of herself.

Wiley, of Milford, was released on bail and is scheduled for arraignment Dec. 1. It wasn’t immediately known if he had a lawyer. A message seeking was left at his home.

Merrimack Superintendent Marge Chiafery said Wiley submitted a letter of retirement, effective immediately. She said she was “shocked and saddened” by the case.

Chiafery said police contacted her over Columbus Day weekend to let her know they were investigating a teacher in the district.

The principal of Merrimack High School planned to address students Tuesday.

“Students looked up to Mr. Wiley,” said Jen Francazio, a 2003 graduate. “It was always my impression that he respected his students completely.

She added: “To find out otherwise is both shocking and deeply disappointing.”