How acacia tree prevents giraffe eating all it's leaves?

A giraffe eating leaves from an acacia tree.

Ants and acacia trees

The giraffe loves the leaves of the acacia, but the acacia fights back.

The tree harbors colonies of ants, which live in the black, hollow galls that cover the branches.

Each leaf stem has a nectar outlet that apparently serves no other purpose than that of feeding the ants.

When a giraffe comes to browse on the tree, it disturbs the ants, which scurry all over the branches and onto the animal.

These particular ants, of the Crematogaster species, have a very painful sting; therefore, the giraffe does not spend very long at one tree, but goes from tree to tree.

Although this mechanism does not stop the giraffe from browsing on this type of acacia, it apparently insures that the damage is distributed throughout the tree population.