Europeans first settled New Hampshire in the 1620s, and the province consisted for many years of a small number of communities along the seacoast, Piscataqua River, and Great Bay. In 1641 the communities were organized under the government of the Massachusetts Bay Colony, until Charles II issued a colonial charter for the province and appointed John Cutt as President of New Hampshire in 1679. After a brief period as a separate province, the territory was absorbed into the Dominion of New England in 1686. Following the collapse of the unpopular Dominion, on October 7, 1691 New Hampshire was again separated from Massachusetts and organized as an English crown colony. Its charter was enacted on May 14, 1692, during the coregency of William and Mary, the joint monarchs of England, Scotland, and Ireland. Between 1699 and 1741, the province's governor was often concurrently the governor of the Province of Massachusetts Bay. This practice ended completely in 1741, when Benning Wentworth was appointed governor. Wentworth laid claim on behalf of the province to lands west of the Connecticut River, east of the Hudson River, and north of Massachusetts, issuing controversial land grants that were disputed by the Province of New York, which also claimed the territory. These disputes resulted in the eventual formation of the Vermont Republic and the US state of Vermont.
The province's economy was dominated by timber and fishing. The timber trade, although lucrative, was a subject of conflict with the crown, which sought to reserve the best trees for use as ship masts. Although the Puritan leaders of Massachusetts ruled the province for many years, the New Hampshire population was more religiously diverse, originating in part in its early years with refugees from opposition to religious differences in Massachusetts.
From the 1680s until 1760, New Hampshire was often on the front lines of military conflicts with New France and the Abenaki people, seeing major attacks on its communities in King William's War, Dummer's War, and King George's War. The province was at first not strongly in favor of independence, but with the outbreak of armed conflict at Lexington and Concord many of its inhabitants joined the revolutionary cause. After Governor John Wentworth fled New Hampshire in August 1775, the inhabitants adopted a constitution in early 1776. Independence as part of the United States was confirmed with the 1783 Treaty of Paris.
Prior to English colonization, the area that is now northeastern New England was populated by bands of the Abenaki, who lived in sometimes-large villages of longhouses. Depending on the season, they would either remain near their villages to fish, gather plants, engage in sugaring, and trade or fight with their neighbors, or head to nearby fowling and hunting grounds; later they also farmed tobacco and the "three sisters": corn, beans, and squash. The seacoast was explored in the early years of the 17th century by English and French explorers, including Samuel de Champlain and John Smith.
Permanent English settlement began after land grants were issued in 1622 to John Mason and Sir Ferdinando Gorges for the territory between the Merrimack and Sagadahoc (Kennebec) rivers, roughly encompassing present-day New Hampshire and western Maine. Settlers, whose early leaders included David Thomson, Edward Hilton and his brother William Hilton, began settling the New Hampshire coast as early as 1623, and eventually expanded along the shores of the Piscataqua River and the Great Bay. These settlers were mostly intending to profit from the local fisheries. Mason and Gorges, neither of whom ever came to New England, divided their claims along the Piscataqua River in 1629. Mason took the territory between the Piscataqua and Merrimack, and called it "New Hampshire", after the English county of Hampshire.