In 1849 the United States Army established Fort Worth, one of a line of ten posts in Texas designed to protect United States-held territory from the Comanche people. The fort attracted settlers and traders, and after the army moved west in 1853, the settlement became a county seat in 1856. During the American Civil War (1861-1865) Fort Worth was again used as a frontier outpost to defend nearby settlers from Comanche raiders. The settlement grew after the Civil War, serving as a gathering place for cowboys and cattle buyers and a starting spot for the driving of longhorn cattle to Kansas. In 1873 the town was incorporated.
By 1876 Fort Worth had become the eastern terminus for the Texas and Pacific Railroad. The completion of the railroad was financed by Fort Worth citizens after the railroad company went bankrupt. The railroad quickly attracted industry and commerce to the town. Agricultural products, particularly cattle, continued to provide most of Fort Worth's income. In the early 20th century the city built stockyards and became the primary slaughtering, packing, and shipping point for livestock in the state.