English settlers arrived in 1623, and the riverside settlement was named Strawbery Banke for the wild berries on its shore; it became Portsmouth in 1653. The land was the home of Abenaki peoples.
Portsmouth grew rich on shipbuilding, the mast trade and sea commerce, and was the colonial capital of New Hampshire. In December 1774 local patriots raided Fort William and Mary at New Castle for its gunpowder, one of the first acts of the Revolution. The Portsmouth Naval Shipyard, founded in 1800 across the river in Kittery, Maine, built ships and later submarines, and hosted the talks that ended the Russo-Japanese War — the Treaty of Portsmouth of 1905.
In the 1950s a neighbourhood of old houses facing demolition was saved and became the Strawbery Banke Museum.