Bismarck is the capital of the state of North Dakota, the county seat of Burleigh County, and the second most populous city in North Dakota after Fargo. The city was formed in 1872 as Edwinton after Edwin Ferry Johnson, a chief engineer for the Northern Pacific Railway company, when the railroad reached the eastern banks of the Missouri River. The name was changed less than one year later, honoring German chancellor Otto von Bismarck, in an effort to attract German immigrants. The discovery of gold in the nearby Black Hills in 1874 was the first real impetus for growth. In 1883, Bismarck became the capital of the Dakota Territory and, in 1889, of the state of North Dakota.