Danvers is a town (and census-designated place) in Essex County, Massachusetts, United States, located on the Danvers River near the northeastern coast of Massachusetts. As of the 2010 census, the town's population was 26,493.
The area was long settled by indigenous cultures of Native Americans. In the historic period, the Massachusett, a tribe of the Pequot language family, dominated the area.Around 1630, English colonists improved an existing Naumkeag trail as the Old Ipswich Road, creating a connection to the main cities of Salem and Boston. Danvers was permanently settled in 1636 as Salem Village, and eventually petitioned the Crown for a charter as a town. According to legend, the King, rather than signing the charter, returned it with the message "The King Unwilling." On June 9, 1757, the town was incorporated anyway. It put the King's rebuff on the town's seal. In 1752, the town was named for settlerDanvers Osborn.In 1847, the railroad came to Danvers. A street railway was installed in 1884, originally consisting of 69 horse-drawn trolleys. This system was later converted to electricity.In 1878, the Danvers State Hospital opened its doors. It was an institution to provide asylum and treatment for the mentally ill.Originally an agricultural town, Danvers farmers developed two breeds of vegetables: the Danvers Onion (origin of the "Oniontown" nickname) and the Danvers Half-Long Carrot. This carrot was introduced by "market gardeners" in 1871.