The Araguaia Guerrilla War is funny, and a case of an incompetent insurgency meeting, after several tries, a brilliant counterinsurgency. <100 Maoists hid in the jungle, this was the biggest ever rural communist insurgency - you can see none of them were on a FARC scale. The local population was friendly but realized they were very intellectualized people from far away and saw throug their attempts at blending in. The insurgency never took roots to self-replicate on a lasting base of popular support, it could be taken out by simply killing the Party members, they had local collaborators but wouldn't replenish their numbers. And yet the first counterinsurgency offensives, with huge numbers of conventional troops, were useless shows of force. Military casualties were very low but conventional commanders didn't even know where the guerrillas operated. Then the troops were withdrawn and intelligence agents infiltrated in the area, disguised as merchants and other individuals. The glowies compiled information on the entire Party structure. Guerrilla-style special forces teams (callsigns, no identification on uniforms, good understanding of the jungle, etc.) were then deployed to hunt down the guerrillas, while iron-fisted curfews were imposed on the civilian population. Insurgents were captured, tortured for information and executed. After their leaders fell, the rest were disorganized. Very few managed to escape, and some of those who did were also killed on a raid against a Party meeting in São Paulo. Maoism was completely annihilated, the Party's survivors turned into generic leftist organization.
>Something that always stuck out to me about south american/third world armed forces is they seem to be entirely separate from their governments. They’re not under the command of the government, but rather operate independently. It seems like this is part of why coup attempts are so common.
Theoretically not true with Brazil's civilian-run Ministry of Defense, but it's recent (1999). Historically each Armed Forces branch had its own Ministry, almost always selected among their own officers, and had a considerable degree of independence. There were also strong interservice rivalries.
Officers still form castes with opaque, self-contained professional activities and social lives. At least in the Army, officers are mostly drawn from sons of officers. In the past the institution had more prestige but nowadays few in the population's higher IQ segments venture into an Army career. It's far from a dominant caste, they have to cling on to what privileges they still have, a decade ago they were respected but at present there's a strong anti-military feeling. What stops coups is that the average officer is an apathetic fence-sitter who wouldn't be rebellious even if he wanted to because he cares far more about not bothering his superiors and losing his chances of career progression. Even in the past, 90% of them were like this, they just got dragged along by revolutionary minorities at some points. Civilian-military separation was a source of coups, but not because of bureaucratic autonomy, higher-ups were usually loyal. It's because officers thought they were more meritocratic and moral than civilian elites (this, back when they still attracted talents). And later on in the 20th century, when they thought industrial development, internal order and the Army's interests were all connected and had to be run by the same people (themselves).