Groton is a town in northwestern Middlesex County, Massachusetts, United States. The population was 10,646 at the 2010 census. It is home to two noted prep schools: Groton School, founded in 1884, and Lawrence Academy at Groton, founded in 1793. The historic town was a battlefield in King Philip's War and Queen Anne's War, experienced incidents of insurrection during Shays's Rebellion, and was the birthplace of William Prescott, who commanded the rebel forces at the Battle of Bunker Hill.