From FM-34, the United States Army and Marine Corps Counterinsurgency Field Manual:
During Napoleon’s occupation of Spain in 1808, it seems little thought was given to the potential challenges of subduing the Spanish populace. Conditioned by the decisive victories at Austerlitz and Jena, Napoleon believed the conquest of Spain would be little more than a “military promenade.” Napoleon’s campaign included a rapid conventional military victory but ignored the immediate requirement to provide a stable environment for the populace. The French failed to analyze the Spanish people, their history, culture, motivations, and potential to support or hinder the achievement of French political objectives. The Spanish people were accustomed to hardship, suspicious of foreigners and constantly involved in skirmishes with security forces. Napoleon’s cultural miscalculation resulted in a protracted occupation struggle that lasted nearly six years and ultimately required approximately three-fifths of the Empire’s total armed strength, almost four times the force of 80,000 Napoleon originally designated.
The Spanish resistance drained the resources of the French Empire. It was the beginning of the end for Napoleon. At the theater level, a complete understanding of the problem and a campaign design that allowed the counterinsurgency force to learn and adapt was lacking.
Doesn't Napoleon's predicament sound familiar?