Militia
With the Constitutional Convention of 1787 and Article 1 Section 8 of the United States Constitution, control of the army and the power to direct the militia of the states was concurrently delegated to the federal Congress. The Militia Clauses gave Congress authority for "organizing, arming, and disciplining" the militia, and "governing such Part of them as may be employed in the Service of the United States", and the States retained authority to appoint officers and to impose the training specified by Congress. Proponents describe a key element in the concept of "militia" was that to be "genuine" it not be a "select militia", composed of an unrepresentative subset of the population. This was an argument presented in the ratification debates.
The first legislation on the subject was the Militia Act of 1792 which provided, in part:

That each and every free able-bodied white male citizen of the respective States, resident therein, who is or shall be of age of eighteen years, and under the age of forty-five years (except as is herein after excepted) shall severally and respectively be enrolled in the militia,... every citizen, so enrolled and notified, shall, within six months thereafter, provide himself with a good musket or firelock.
Prior to the War of Independence, the officers of militia units were commissioned by the royal governors. During the war, they were commissioned either by the legislature or the chief executive of the state. After the war, commissions were typically granted by the state's chief executive. Militias did not operate independently of the state governments but were under the command of the civil government just like the regular military forces. Twenty-four of the current US states maintain state defense forces in the form of a constitutional militia in addition to the National Guard which is shared with the US government. These states include Alabama, Alaska, California, Connecticut, Georgia, Illinois, Indiana, Louisiana, Maryland, Massachusetts, Michigan, Missouri, New Jersey, New Mexico, New York, Ohio, Oklahoma, Oregon, South Carolina, Tennessee, Texas, Washington, Vermont, and Virginia. In addition, the Territory of Puerto Rico has a defense force.

19th century: During the nineteenth century, each of the states maintained its militia differently, some more than others. American militia saw action in the various Indian Wars, the War of 1812, the American Civil War, and the Spanish–American War. Sometimes militia units were found to be unprepared, ill-supplied, and unwilling. Prior to the Civil War, militia units were sometimes used by southern states for slave control. Formed in 1860, Republican Party-affiliated Wide Awakes clubs were quick to take action to defend persons against southern slave-hunters. In California, the militia carried out campaigns against bandits and against the Indians at the direction of its Governor between 1850 and 1866. During Reconstruction after the Civil War, Republican state governments had militias composed almost entirely of freed slaves and populist whites. Their deployment to maintain order in the former Confederate states caused increased resentment among many Southern whites.
After the American Civil War, secret groups like the Ku Klux Klan and Knights of the White Camellia arose quickly across the South, reaching a peak in the late 1860s. Even more significant in terms of effect were private militias: paramilitary organizations that formed starting in 1874, including the White League in Louisiana, which quickly formed chapters in other states; the Red Shirts in Mississippi in 1875, and with force in South Carolina and North Carolina; and other "white line" militias and rifle clubs.
In contrast to the KKK, these paramilitary organizations were open; members were often well known in their communities. Nevertheless, they used force, intimidation, and violence, including murder, to push out Republican officeholders, break up organizing, and suppress freedmen's voting and civil rights. The paramilitary groups were described as "the military arm of the Democratic Party" and were instrumental in helping secure Democratic victories in the South in the elections of 1876.

20th century: The Militia Act of 1903 divided what had been the militia into what it termed the "organized" militia, created from portions of the former state guards to become state National Guard units, and the "unorganized" militia consisting of all males from ages 17 to 45, with the exception of certain officials and others, which is codified in 10 U.S.C. § 311. Some states, such as Texas, California, and Ohio, created separate state defense forces for assistance in local emergencies. Congress later established a system of "dual enlistment" for the National Guard, so that anyone who enlisted in the National Guard also enlisted in the U.S. Army. When the U.S. Air Force was established as an independent service in 1947, the National Guard was further divided into the Army National Guard and the Air National Guard. Under this construct, the 1933 defense act's "dual enlistment" facet was further amended so that enlisted soldiers and commissioned officers in the Army National Guard were also enlisted or commissioned in the Reserve Component of the U.S. Army. Enlisted airmen and commissioned officers in the Air National Guard were also enlisted or commissioned in the Air Reserve Component (ARC) of the U.S. Air Force.
The 20th century saw the rise of militia organizations in the United States, these private militias often have an anti-government outlook and are not under the civil authority of the states. Privately organized citizen militia-related groups blossomed in the mid-1990s. Many militia groups are based on religious or political extremism and some are regarded as hate groups.

21st century: In the 2008 decision of the Supreme Court, in District of Columbia v. Heller, the de jure definition of "militia" as used in United States jurisprudence was discussed. The Court's opinion made explicit, in its obiter dicta, that the term "militia", as used in colonial times in this originalist decision, included both the federally organized militia and the citizen-organized militias of the several States: "... the 'militia' in colonial America consisted of a subset of 'the people'—those who were male, able-bodied, and within a certain age range" (7)... Although the militia consists of all able-bodied men, the federally-organized militia may consist of a subset of them"(23).

Active militias: National Guard
State defense forces

Texas: The most important previous activity of the Texas Militia was the Texas Revolution in 1836. Texans declared independence from Mexico while they were defeated during the Battle of the Alamo, in March 1836. On April 21, 1836, led by Sam Houston, the Militia attacked the Mexican Army at their camp, in the Battle of San Jacinto near the present city of Houston. 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. Texas militiamen joined Theodore Roosevelt's Rough Riders, a volunteer militia, and fought with him during the Spanish–American War in 1898. Some of the training of the Rough Riders took place in San Pedro Park, in the north-central part of San Antonio near the present site of San Antonio College. When a muster of the Militia proposed to train there on April 19, 1994, they were threatened with arrest, even though the charter of San Pedro Park forbids exclusion of activities of that kind. This threat led to a change in the meeting site. Like many other American states, Texas maintains a recognized State Militia, the Texas State Guard.

Vietnam: The Dân quân tự vệ (Self-Defence Militia) is a part of Vietnam People's Armed Forces. The militia organized in communes, wards and townships and is put under commune-level military commands.
The Self-Defence Militia has two branches: Dân quân tự vệ nòng cốt (Core Self-Defence Militia) and Dân quân tự vệ rộng rãi (General Self-Defence Militia). The term of service in the Core Militia is 4 years.

SFR Yugoslavia: Beside the federal Yugoslav People's Army, each constituent republic of the former SFR Yugoslavia had its own Territorial Defense Forces. The Non-Aligned Yugoslavia was concerned about eventual aggression from any of the superpowers, especially by the Warsaw Pact after the Prague Spring, so the Territorial Defense Forces were formed as an integral part of the total war military doctrine called Total National Defense. Those forces corresponded to military reserve forces, paramilitary or militia, the latter, in the military meaning of the term (like military formation). It should not be confused with the Yugoslav Militia- Milicija which was a term for a police.

See also: Condottieri
Gendarmerie
Historical reenactment
Irregular military
Milicja Obywatelska
National Bolivarian Militia of Venezuela
Voluntary Militia for National Security
Violent non-state actor

References: 

Citations: 

Sources: 

Further reading: 
Aliyev, Huseyn (Jan.