is a town in Rockingham County, New Hampshire, United States. The population was 5,182 at the 2000 census.
The first settlement in New Hampshire, originally named Pannaway, was established in 1623 at Odiorne's Point. The first settler in Rye was William Berry. Prior to its incorporation in 1726 as a parish of New Castle, Rye was called Sandy Beach and included land in New Castle, Portsmouth, Greenland and Hampton.