Western New York's land was acquired from the Iroquois through the Nanfan Treaty, which ceded the territory to England at the end of the Beaver Wars in 1701. At the time, four of the British colonies (Pennsylvania, New York, Massachusetts and Connecticut) laid claim to the unsettled territory, as did New France until the Seven Years' War. Most of Western New York was officially off-limits to all of the colonies as a result of the establishment of an Indian Reserve over the area following the Seven Years' War. By the 1780s, only New York and Massachusetts still maintained their claims to the territory, which was separated from mainland New York by a Preemption Line.