Montana is a state in the Pacific Northwest and Great Plains regions of the United States of America. The central and western thirds of the state have numerous mountain ranges (approximately 77 named) of the northern Rocky Mountains; thus the state's name, derived from the Spanish word montaña ("mountain"). The state nickname is the "Treasure State." Other nicknames include "Land of Shining Mountains," "Big Sky Country," and the slogan "the last best place." The state ranks fourth in area, but 44th in population, and therefore has the third lowest population density in the United States. The economy is primarily based on agriculture and significant lumber and mineral extraction. Tourism is also important to the economy, with millions of visitors a year to Glacier National Park, the Battle of Little Bighorn site, and three of the five entrances to Yellowstone National Park.

Native Americans were the first of many inhabitants of the state of Montana. Groups included the Crow in the south-central area, the Cheyenne in the southeast, the Blackfeet, Assiniboine and Gros Ventres in the central and north-central area and the Kootenai and Salish in the west. The smaller Pend d'Oreille and Kalispel tribes were found around Flathead Lake and the western mountains, respectively.

Montana east of the continental divide was part of the Louisiana Purchase in 1803. Subsequent to the Lewis and Clark Expedition and after the finding of gold and copper in the state in the late 1850s, Montana became a United States territory (Montana Territory) on May 26, 1864, and the 41st state on November 8, 1889.

Fort Shaw (Montana Territory) was established in the spring of 1867. It is located west of Great Falls in the Sun River Valley and was one of three posts authorized to be built by Congress in 1865. The other two posts in the Montana Territory were Camp Cooke on the Judith River and Fort C.F. Smith on the Bozeman Trail in south central Montana Territory. Fort Shaw, named after Colonel Robert Gould Shaw, who commanded the 54th Massachusetts, one of the first all African-American regiments, during the American Civil War, was built of adobe and lumber by the 13th Infantry. The fort had a parade ground that was 400 ft² (120 m²), and consisted of barracks for officers, a hospital, and a trading post, and could house up to 450 soldiers. Completed in 1868, it was used by military personnel until 1891.

After the close of the military post, the government established Fort Shaw as a school to provide industrial training to young Native Americans. The Fort Shaw Indian Industrial School was opened on April 30, 1892. The school had at one time 17 faculty members, 11 Indian assistants and 300 students. The school made use of over 20 of the buildings built by the Army.

The revised Homestead Act of the early 1900s greatly affected the settlement of Montana. This act expanded the land that was provided by the Homestead Act of 1862 from 160 acres to 320 acres (65-130 ha). When the latter act was signed by President Taft, it also reduced the time necessary to prove up from five years to three years and permitted five months' absence from the claim each year.

In 1908, the Sun River Irrigation Project, west of Great Falls was opened up for homesteading. Under this Reclamation Act, a person could obtain 40 acres (16 ha). Most of the people who came to file on these homesteads were young couples who were eager to live near mountains where hunting and fishing were good. Many of these homesteaders came from the Midwest and Minnesota.

Montana was the scene of the Native Americans' last effort to keep their land, and the last stand of U.S. Army Lieutenant Colonel George Armstrong Custer was fought near the present day town of Hardin. Montana was also the location of the final battles of the Nez Perce Wars.

Cattle ranching has long been central to Montana's history and economy. The Grant-Kohrs Ranch National Historic Site in Deer Lodge Valley is maintained as a link to the ranching style of the late 19th century. It is operated by the National Park Service but is also a 1,900-acre (7.7 km²) working ranch.