The community they were purportedly protecting may well have been in league with the militants and pointed out the way they were lying in wait to finish off the peacekeepers. Man is more treacherous than animals.
If the UN doesnt have force in sufficient numbers to overpower them the UN should be prepared to hold talks with the militants instead of going on patrols. Till then such a small force should have stayed put at one spot to guard the civilian population.