York County, Massachusetts was a county in what is now the U.S. state of Maine. It was established in 1652 when the Massachusetts Bay Colony first asserted territorial claims over the settlements of southern Maine, extending from the Piscataqua River to just east of the mouth of the Presumpscot River in Casco Bay. The county eventually grew to encompass effectively all of present-day Maine, although the interior was claimed by various Abenaki peoples, and the territory east of Penobscot Bay was claimed (and partly occupied) as part of French Acadia. By 1760 most of the Abenaki had either been wiped out or retreated northward toward the Saint Lawrence River, and New France had been conquered in the French and Indian War.
The large size of the county led to its division in 1760, with Cumberland and Lincoln counties carved out of its eastern portions. When Massachusetts adopted its state government in 1780, it created the District of Maine to manage its eastern territories. In 1805 the northern portion of York County was separated to form part of Oxford County. When Maine achieved statehood in 1820 all of the counties of the District of Maine became counties of Maine.