Westborough High School Principal John Smith will become Dover-Sherborn High School's headmaster.
Smith said Thursday night he has signed a three-year contract with Dover-Sherborn school officials.
"I really liked everything I saw from the community," he said.
Dover-Sherborn High School has about 650 students, which presents "an opportunity to personalize learning," Smith said.
"I really liked the size," he said.
In December, Westborough School Superintendent Marianne O'Connor announced that Smith would resign at the end of this school year to pursue “other interests in the field of education.”
Smith has served as Westborough High principal for six years.
Smith will replace Dover-Sherborn High School headmaster Denise Lonergan, who is retiring at the end of the school year.