We are moving around freely now. It's no worse than a hot day in Northern Ireland.
-- Major Martin Grixoni, British Royal Marines, after securing the Iraqi port city of Umm Qasr
The problem with occupying a country, as Britain and Israel have learned the hard way, is that you can never count on your subjects to be obedient and cooperative. When they speak up, you punish them. When they fight back, you call them terrorists and punish them harder. When they stubbornly refuse to submit to your superior military - and, of course, moral - imperative, you turn up the violence to grind them down.
But time is on the side of the oppressed in a guerilla war. Unless you just kill everyone, there will always be people angry enough to join the resistance, and the technological savvy of the terrorists will gradually increase until it is capable of effectively retaliating against the occupying army. Recall that by the end of the Lebanese occupation, Hezbollah was able to destroy Israeli tanks with homemade explosives. At that point, the occupying power starts to question whether the benefits of continued occupation justify the escalating costs.
Thus begins the "peace process".