Mormon migration passed along the trail in 1847-1849, and in 1853 fifty-five Mormons settled on Green river at the trading post of James Bridger, which they purchased and named Fort Supply. This S.W. corner of the present state was at that time a part of Utah. With the approach of United States troops under Albert Sidney Johnston in 1857, Fort Supply was abandoned, and in the next year the Mormon settlers retired to Salt Lake City' again leaving the region almost without permanent inhabitants.
The Indians saw with alarm the movement of so many whites through their hunting grounds and became increasingly unfriendly. By a treaty negotiated at Fort Laramie in 1851, the Arapahoes, Sioux, Cheyennes and others agreed to confine themselves within the territory bounded by 100° and 107° W. longitude and 39° and 44° N. latitude, but, besides minor conflicts, a considerable portion of the garrison of Fort Laramie was killed in 1854 and there was trouble for more than twenty years. During the Civil War (1861-1865) the Indians were especially bold as they realized that the Federal troops were needed elsewhere. Meanwhile, there began a considerable migration to Montana, and the protection of the N. of the trail demanded the construction of posts, of which the most important were Fort Reno, on the Powder river, and Fort Phil Kearny in the Bighorn Mountains. In spite of the treaty allowing the opening of the road, during a period of six months fifty-one hostile demonstrations were made, and on the 21st of December 1866 Captain W. J. Fetterman and seventy-eight men from Fort Phil Kearny were ambushed and slain. Hostilities continued in 1867, but the troops were hampered on account of the scarcity of cavalry. Congress in 1867 appointed a commission to arrange a peace, but not until 1868 (29th April, at Fort Laramie) were any terms agreed upon. The posts on the Montana trail were abandoned, and the Indians agreed to remove farther E. and to cease attacking trains, not to oppose railway construction, &c. The territory N. of the Platte river and E. of the Bighorn Mountains was to be reserved as an Indian hunting ground and no white men were to settle on it without the consent of the Indians. Gold was discovered on the Sweetwater river in 1867, and a large inrush of population followed. This unorganized territory E. of the Rocky Mountains was a part of Dakota, and in January 1868 Carter (later Sweetwater) county was erected. Farther E. Cheyenne was laid out by the Union Pacific Railroad (July 1867), a city government was established in August, newspapers began publication, and Laramie county was organized before the arrival of the first railway train on the 13th of November 1867. About six thousand persons spent the winter in Cheyenne, and disorder was checked only by the organization of a vigilance committee. Almost the same scenes followed the laying off of Laramie in April 1868, when 400 lots were sold during the first week and 500 habitations were erected within a fortnight. Albany and Carbon counties were organized farther W. in the same year.
A bill to organize the Territory of Wyoming had been introduced into Congress in 1865, and in 1867 the voters of Laramie county had chosen a delegate to Congress. He was not permitted to take a seat, but his presence in Washington hastened action, and on the 25th of July 1868 the act of Congress establishing a Territory with the present boundaries was approved by President Andrew Johnson. The portion of the Territory E. of the Rocky Mountains was taken from Dakota and that W. from Utah and Idaho, and included parts of the three great additions to the original territory of the United States. That portion E. of the mountains was a part of the Louisiana Purchase (1803), the W. portion above 42° was a part of the Oregon country, and that S. of that parallel came by the Mexican cession of 1848. The first governor, John A. Campbell, was appointed in April 1869, and the organization of the Territory was completed in May of the same year. At the first election, on the 2nd of September 1869, 5266 votes were cast. The legislature established the seat of government at Cheyenne, and granted full suffrage and the right of holding office to women. The first great inrush of population, following the discovery of gold and the opening of the railway, brought many desperate characters, who were held in check only by the stern, swift measures of frontier justice. After the organization of the Territory, except for the appearance of organized bands of highwaymen in 1877-1879, there was little turbulence, in marked contrast with conditions in some of the neighbouring Territories. Agriculture began in the narrow but fertile river valleys, and stock-raising became an important industry, as the native grasses are especially nutritious. The history of the Territory was marked by few striking events other than Indian troubles. The N.E. of the Territory, as has been already said, had been set apart (1868) as a hunting ground for the Sioux Indians, but the rumour of the discovery of gold in the Black Hills and the Bighorn Mountains in 1874-1875 caused a rush to the region which the military seemed powerless to prevent. The resentful Indians resorted to war. After a long and arduous contest in Wyoming, Montana and Dakota, which lasted from 1874 to 1879, and during which General George A. Custer (q.v.) and his command were killed in 1876 on the Little Bighorn in Montana, the Indians were thoroughly subdued and confined to reservations. The settlers in Wyoming shared the general antipathy to the Chinese, common to the western country. On the 2nd of September 1885 the miners at Rock Springs attacked about 400 Chinamen who had been brought by the railway to work in the mines, killing about fifty of them and driving the remainder from the district. Governor Warren summoned Federal troops and prevented further destruction of life and property.
The Territory increased in population and more rapidly in wealth, owing chiefly to the large profits in cattle raising, though this prosperity suffered a check during the severe winter of 1886-1887, when nearly three-fourths of the range cattle died of exposure. Agitation for statehood increased, and on the 30th of September 1889 a constitution was formed which was adopted by the people in November of the same year. The Constitution, which continued the Territorial provision of full suffrage for women, met the approval of Congress, and on the 10th of July 1890 Wyoming was formally admitted as a state. Since admission the progress of the state has been steady. Extensive irrigation projects have made available many thousand acres of fertile land, and much more will be subjected to cultivation in the future as the large ranges are broken up into smaller tracts. In some sections a system of dry-farming, by which the scanty rainfall is protected from evaporation by deep ploughing and mulching the soil, has proved profitable.
The transition of the principal stock-raising industry from large herds of cattle to small, and the utilization of the ranges for sheep grazing almost exclusively covered a period of over twenty years preceding 1910, during which time many conflicts occurred between range cattle-owners and sheep flock masters over the use of the grazing grounds. The settler also, who selected his homestead covering watering places to which the range cattle formerly had free access, came into conflict with the cattlemen. Some of these small settlers owned no cattle, and subsisted by stealing calves and imbranded cattle (mavericks) belonging to the range cattlemen. In parts of the state it became impossible to get a jury composed of these small squatters to convict anybody for stealing or killing cattle, and so bad did this become that, in 1892, certain cattlemen formed a small army of mounted men and invaded the central part of the state with the avowed intention of killing all the men generally considered to be stock thieves, an episode known as the Johnson County Raid. This armed body, consisting of over fifty men, surrounded a log cabin and shot down two of the supposed cattle “rustlers,” the latter defending themselves bravely. The country round was roused and large numbers of settlers and others turned out and besieged the cattlemen, who had taken refuge in some ranch buildings. Their case was becoming desperate when a troop of Federal cavalry arrived, raised the siege, and took the cattlemen back to Cheyenne as prisoners. They were subsequently held for murder, but were finally released without trial. Since that time experience has proved that the grazing ranges of the state are better suited to sheep than cattle, the former being much more profitable and better able to stand the cold on the open range.