Guerrilla warfare is a form of irregular warfare in which small groups of combatants, such as paramilitary personnel, armed civilians, or irregulars, use military tactics including ambushes, sabotage, raids, petty warfare, hit-and-run tactics, and mobility, to fight a larger and less-mobile traditional military.
Although the term "guerilla warfare" was coined in the context of the Peninsular War in the 19th century, the tactical methods of guerrilla warfare have been in use since long before then. In the 6th century BC, Sun Tzu proposed the use of guerrilla-style tactics in The Art of War. The 3rd century BC Roman general Quintus Fabius Maximus Verrucosus is also credited with inventing many of the tactics of guerrilla warfare. The tactics of guerrilla warfare have been used by various different factions throughout history, and are particularly associated with revolutionary movements and popular resistance against invading or occupying armies.
Guerrilla tactics focus on avoiding head-on confrontations with enemy armies, instead engaging in limited skirmishes with the goal of exhausting their adversaries and eventually forcing them to withdraw. Guerilla groups often depend on the logistical and political support of either the local population or foreign backers who do not engage in armed struggle but sympathize with the guerrilla group's efforts.
The Spanish word guerrilla is the diminutive form of guerra ('war'). The term became popular during the early-19th century Peninsular War, when the Spanish and Portuguese people successfully rose against the Napoleonic troops and defeated a highly superior army using the guerrilla strategy. In correct Spanish usage, a person who is a member of a guerrilla unit is a guerrillero ([?eri'?e?o]) if male, or a guerrillera ([?eri'?e?a]) if female.
The term guerrilla was used in English as early as 1809 to refer to the individual fighters (e.g., "The town was taken by the guerrillas"), and also (as in Spanish) to denote a group or band of such fighters. However, in most languages guerrilla still denotes the specific style of warfare. The use of the diminutive evokes the differences in number, scale, and scope between the guerrilla army and the formal, professional army of the state.
The Chinese general and strategist Sun Tzu, in his The Art of War (6th century BC), was one of the earliest to propose the use of guerrilla warfare. This directly inspired the development of modern guerrilla warfare. Guerrilla tactics were presumably employed by prehistoric tribal warriors against enemy tribes. Evidence of conventional warfare, on the other hand, did not emerge until 3100 BC in Egypt and Mesopotamia. Since the Enlightenment, ideologies such as nationalism, liberalism, socialism, and religious fundamentalism have played an important role in shaping insurgencies and guerrilla warfare.
In the 3rd century BC, Quintus Fabius Maximus Verrucosus, widely regarded as the "father of guerrilla warfare", devised the Fabian strategy which was used to great effect against Hannibal Barca's army. The strategy would further influence guerrilla tactics into the modern era.
In the 17th century, Chhatrapati Shivaji Maharaj, founder of the Maratha Empire pioneered Shiva sutra or Ganimi Kava (guerrilla tactics) to defeat larger and more powerful armies of the Mughal Empire.
Kerala Varma Pazhassi Raja used guerrilla techniques in his war against British East India Company between 1790 and 1805. The term guerrilla war was coined in English in 1809 after the Pazhassi revolt against the British. Arthur Wellesley was in charge to defeat his techniques but failed.
The Moroccan national hero Abd el-Krim, along with his father, unified the Moroccan tribes under their control and took up arms against the Spanish and French invaders during the early 20th century. For the first time in history, tunnel warfare was used alongside modern guerrilla tactics, which caused considerable damage and annoyance to both invading armies in Morocco. 
Guerrilla warfare is a type of asymmetric warfare: competition between opponents of unequal strength. It is also a type of irregular warfare: that is, it aims not simply to defeat an enemy, but to win popular support and political influence, to the enemy's cost. Accordingly, guerrilla strategy aims to magnify the impact of a small, mobile force on a larger, more-cumbersome one. If successful, guerrillas weaken their enemy by attrition, eventually forcing them to withdraw.
Tactically, guerrillas usually avoid confrontation with large units and formations of enemy troops but seek and attack small groups of enemy personnel and resources to gradually deplete the opposing force while minimizing their own losses. The guerrilla prizes mobility, secrecy, and surprise, organizing in small units and taking advantage of terrain that is difficult for larger units to use. For example, Mao Zedong summarized basic guerrilla tactics at the beginning of the Chinese Civil War as:
"The enemy advances, we retreat; the enemy camps, we harass; the enemy tires, we attack; the enemy retreats, we pursue.":p. 124
At least one author credits the ancient Chinese work The Art of War with inspiring Mao's tactics.:pp. 6-7 In the 20th century, other communist leaders, including North Vietnamese Ho Chi Minh, often used and developed guerrilla warfare tactics, which provided a model for their use elsewhere, leading to the Cuban "foco" theory and the anti-Soviet Mujahadeen in Afghanistan.
In addition to traditional military methods, guerrilla groups may rely also on destroying infrastructure, using improvised explosive devices, for example. They typically also rely on logistical and political support from the local population and foreign backers, are often embedded within it (thereby using the population as a human shield), and many guerrilla groups are adept at public persuasion through propaganda and use of force. Many guerrilla movements today also rely heavily on children as combatants, scouts, porters, spies, informants, and in other roles. It has drawn international condemnation. Many states also recruit children into their armed forces.
Some guerrilla groups also use refugees as weapons to solidify power or politically destabilize an adversary. The FARC guerrilla war displaced millions of Colombians, and so did the tribal guerrilla warfare (against Soviets) in Afghanistan. The civilian population living in the area might be suspected of having collaborated with the enemy and find itself displaced, as the guerrillas fight for territory.
The growth of guerrilla warfare in the 20th century was inspired in part by theoretical works on guerrilla warfare, starting with the Manual de Guerra de Guerrillas by Matías Ramón Mella written in the 19th century and, more recently, Mao Zedong's On Guerrilla Warfare, Che Guevara's Guerrilla Warfare, and Lenin's text of the same name, all written after the successful revolutions carried by them in China, Cuba and Russia, respectively. Those texts characterized the tactic of guerrilla warfare as, according to Che Guevara's text, being "used by the side which is supported by a majority but which possesses a much smaller number of arms for use in defense against oppression".
Why does the guerrilla fighter fight? We must come to the inevitable conclusion that the guerrilla fighter is a social reformer, that he takes up arms responding to the angry protest of the people against their oppressors, and that he fights in order to change the social system that keeps all his unarmed brothers in ignominy and misery.
In the 1960s, the Marxist revolutionary Che Guevara developed the foco (Spanish: foquismo) theory of revolution in his book Guerrilla Warfare, based on his experiences during the 1959 Cuban Revolution. This theory was later formalised as "focal-ism" by Régis Debray. Its central principle is that vanguardism by cadres of small, fast-moving paramilitary groups can provide a focus for popular discontent against a sitting regime, and thereby lead a general insurrection. Although the original approach was to mobilize and launch attacks from rural areas, many foco ideas were adapted into urban guerrilla warfare movements.
There is no commonly accepted definition of "terrorism", and the term is frequently used as a political tactic by belligerents (most often by governments in power) to denounce opponents whose status as terrorists is disputed.
Contrary to some terrorist groups, guerrillas usually work in open positions as armed units, try to hold and seize land, do not refrain from fighting enemy military force in battle and usually apply pressure to control or dominate territory and population. While the primary concern of guerrillas is the enemy's active military units, terrorists largely are concerned with non-military agents and target mostly civilians. Guerrilla forces principally fight in accordance with the law of war (jus in bello). In this sense, they respect the rights of innocent civilians by refraining from targeting them.