 Following the war, some militia units reorganized into what was later to be known as the Texas Rangers, which was a private, volunteer effort for several years before becoming an official organization.After Texas joined the Union of the United States in 1845, Texas militia units participated in the Mexican–American War.In 1861 Texas joined the other Confederate States in seceding from the Union, and Texas militias played a role in the American Civil War, until it ended in 1865.