MAYS LANDING, N.J. — A former New Jersey elementary school choir teacher accused of sexually assaulting a student twice a week for the past three years has pleaded guilty to a child endangerment charge.

Prosecutors in Atlantic County said 53-year-old Brian McSee’s plea Monday to endangering the welfare of a child by sexual conduct came as part of an agreement in which he is to serve five years in prison. He is scheduled for sentencing May 4.

Defense attorney Angela Hartman said other charges were dropped. McSee originally was charged with aggravated sexual assault, official misconduct and criminal sexual contact.

He was the seventh- and eighth-grade choir teacher at Port Republic Elementary School and choir director at St. Paul’s United Methodist Church, where the child’s family attends services.