Sawfly is the common name for insects belonging to suborder Symphyta of the order Hymenoptera. Sawflies are distinguishable from most other hymenopterans by the broad connection between the abdomen and the thorax, and by their caterpillar-like larvae. The common name comes from the saw-like appearance of the ovipositor, which the females use to cut into the plants where they lay their eggs. Large populations of certain sawfly species can cause substantial economic damage to forests and cultivated plants.
Sawflies are a group of largely phytophagous (herbivorous) insects. The overall group is paraphyletic, but the name is still in common use, and treated as a suborder, though it seems likely it will be phased out in future classifications. These superfamilies are regarded as the most primitive taxa within the Hymenoptera (some going back 200 million years), and one of the taxa within the Symphyta gave rise to the suborder Apocrita (wasps, bees and ants - this group is considered monophyletic). In the opinion of many experts, the most likely sister taxon to the Apocrita is the family Orussidae, the only symphytan group which is parasitic.
The larvae look like caterpillars (the larvae of moths and butterflies), with some notable differences; (1) they have six or more pairs of prolegs (sometimes greatly reduced and difficult to see) on the abdomen, while caterpillars have five pairs or fewer, (2) they have two stemmata instead of a caterpillar's six, (3) caterpillars (except for a tiny minority) always have the two first abdominal segments legless, and (4) sawfly larvae have an invariably smooth head capsule with no cleavage lines, while lepidopterous caterpillars bear an inverted "Y" or "V" (adfrontal suture). Typical sawfly larvae are herbivorous, the group feeding on a wide range of plants. Individual species, however, are often quite specific in their choice of plants used for food. The larvae of various species exhibit leaf-mining, leaf "rolling", or gall formation. Three families are strictly xylophagous, and called "wood wasps", and one family is parasitic. The larvae that do not feed externally on plants are grub-like, without prolegs. When harassed, many sawfly larvae are able to squirt a foul liquid from their last segment. 
Bristly rose sawfly Cladius difformis, above millimeter scale
Adult sawflies, except for those in the family Cephidae, have structures that latch onto the underside of the fore wings to help hold the wings in place when the insect is at rest. These "cenchri", which are absent in the suborder Apocrita, are located behind the scutellum on the thorax. Adults of some species are carnivorous, eating other insects, but many also feed on nectar. Adults also have stronger antennae.