Syrian rebels freed 21 UN peacekeepers on Saturday after holding them hostage for four days, ending a sudden entanglement with the world body that earned fighters trying to oust President Bashar Assad a flood of negative publicity.