Posse comitatus is the common-law or statute law authority of a county sheriff, or other law officer, to conscript any able-bodied man to assist him in keeping the peace or to pursue and arrest a felon, similar to the concept of the "hue and cry." Originally found in English common law, it is generally obsolete; however, it survives in the United States, where it is the law enforcement equivalent of summoning the militia for military purposes.
The term derives from the Latin posse comit?t?s, "power" or "force of the county", in English use from the late 16th century, shortened to posse from the mid 17th century. While the original meaning refers to a group of citizens assembled by the authorities to deal with an emergency (such as suppressing a riot or pursuing felons), the term is also used for any force or band, especially with hostile intent, often also figuratively or humorously. In 19th-century usage, posse comitatus also acquires the generalized or figurative meaning. In classic Latin, posse is a contraction of "potesse," an irregular, subjunctive Latin verb meaning "to be able."  Thus when paired with comit?tus, the abstract verbal noun of comito "to accompany," posse comitatus literally means: "to be able to accompany."   In its earliest days the posse comitatus was subordinate to king, country and local authority. 
In 1642, during the early stages of the English Civil War, local forces were employed everywhere by all sides that could. The powers responsible produced valid written authority, inducing the locals to assemble. The two most common authorities used were the Militia Ordinance on the side of the Parliament and that of the king, the old-fashioned Commissions of Array. But the Royalist leader in Cornwall, Sir Ralph Hopton, indicted the enemy before the grand jury of the county as disturbers of the peace, and had the posse comitatus called out to expel them.
The powers of sheriffs in England and Wales for posse comitatus were codified by section 8 of the Sheriffs Act 1887, the first subsection of which stated that:
Every person in a county shall be ready and apparelled at the command of the sheriff and at the cry of the country to arrest a felon whether within a franchise or without, and in default shall on conviction be liable to a fine, and if default be found in the lord of the franchise he shall forfeit the franchise to the Queen, and if in the bailiff he shall be liable besides the fine to imprisonment for not more than one year, or if he have not whereof to pay the fine, than two years.
This permitted the (high) sheriff of each county to call every citizen to his assistance to catch a person who had committed a felony--that is, a serious crime. It provided for fines for those who did not comply. The provisions for posse comitatus were repealed by the Criminal Law Act 1967. The second subsection provided for the sheriff to take "the power of the county" if he faced resistance whilst executing a writ, and provided for the arrest of resisters. This subsection is still in force.
Every law enforcement officer is bound to execute the penal warrants given to him to execute. He may summon to his assistance, either in writing or orally, any of the citizens of the neighborhood or county to assist in the execution of such warrants. The acts of the citizens formed as a posse by such officer shall be subject to the same protection and consequences as official acts.
Resorting to the posse comitatus figures often in the plots of Western movies, where the body of men recruited is frequently referred to as a posse. Based on this usage, the word "posse" has come to be used colloquially to refer to various teams, cliques, or gangs, often in pursuit of a crime suspect (on horseback in the westerns), sometimes without legal authority.
In a number of states, especially in the Western United States, sheriffs and other law enforcement agencies have called their civilian auxiliary groups "posses." The Lattimer Massacre of 1897 illustrated the danger of such groups, and thus ended their use in situations of civil unrest. Posse comitatus in America became not an instrument of royal prerogative, but an institution of local self-governance. The posse functioned through, rather than upon, the local popular will. From 1850 to 1878, the federal government had expanded its power over individuals. This was done to safeguard national property rights for slaveholders, emancipate millions of enslaved African Americans, and enforce the doctrine of formal equality. The rise of the federal state, like the marketplace before it, had created contradictory but congruous forces of liberation and compulsion upon individuals. 
In the early decades of the republic, before slavery became a major conflict, federal use of posse comitatus in the states was rare and sporadic.  But the federal posse comitatus, quite literally, had compelled all of America to accept the legitimacy of slavery. In an exhaustive study of lynching in Colorado, historian Stephen Leonard defines lynching very broadly; he includes the people's courts and even posses (which by definition were led by sheriffs).  Indisputably, historical records link violent lawlessness, and even lynchings, to posse comitatus.
In the United States, a federal statute known as the Posse Comitatus Act, enacted in 1878, forbade the use of the United States Army, and through it, its offspring, the United States Air Force, as a posse comitatus or for law enforcement purposes without the approval of Congress. While the act does not explicitly mention the United States Navy and the United States Marine Corps, the Department of the Navy has prescribed regulations that are generally construed to give the act force with respect to those services as well.  In 2013, a directive  from the Secretary of Defense directly addresses this issue: it prohibits the use of the United States Army, the United States Navy, the United States Air Force and the United States Marine Corps for law enforcement.
No such limitation exists on the United States Coast Guard, which can be used for all law enforcement purposes (for example, Coast Guardsmen were used as temporary Air Marshals for many months after the 9/11 attacks) except when, as during World War II, a part of the Coast Guard is placed under the command of the Navy. This part would then fall under the regulations governing the Navy in this matter, rather than those concerning the Coast Guard.
The limitation also does not apply to the National Guard when activated by a state's governor and operating in accordance with Title 32 of the U.S. Code (for example, National Guardsmen were used extensively by state governors during Hurricane Katrina response actions). Conversely, the limitation would apply to the National Guard when activated by the President and operating in accordance with Title 10 of the U.S. Code.