Figs and Wasps
Figs and fig wasps coexist in a symbiotic relationship. In order to reproduce, the fig needs to be pollinated by the wasp, which needs a place for its young to develop.
A fig fruit is essentially an enclosed inflorescence (bundle of flowers), with the reproductive organs located inside. This structure is known as the syconium. The inside of the syconium is lined with flowers.
The cycle begins with a mature female fig wasp. To lay her eggs inside the fig, she must enter it through a small opening in the syconium called the ostiole. This opening is so small that her wings and antennae get ripped off in the process. Once inside, there is no turning back.
Figs produce two types of syconium, the caprifigs (which have both male and female flowers), and the edible figs (which only have female flowers).
If an adult wasp enters a caprifig, she will lay her eggs inside the flowers of the syconium. This is possible because the flowers of the caprifig have short styles, with easily accessible ovaries. These eggs develop inside the ovaries into wasp larvae, and eventually, mature wasps.
The male wasps inside caprifigs are responsible for mating with the females and then digging tunnels out of the fig. The females escape through these tunnels, brushing against the pollen produced by the male flowers in the process.
If a female wasp enters an edible fig, she will be unable to deposit her eggs and will eventually die. This is because the flowers of edible figs have longs styles, which inhibit the wasp from depositing eggs. However, the female wasp carries pollen (remember that she had just escaped from a caprifig) and her activity inside the edible fig pollinates the female flowers.
The pollinated female flowers of the edible fig begin to develop into fruit. Meanwhile, the dead female wasp inside is decomposed by an enzyme known as ficin into proteins. This is absorbed by maturing fruit.
The fig fruits we see at the shops are the ripened fruit of edible figs. These figs do not have any wasps inside them because the wasps have been decomposed by the plant. The caprifigs may have live wasps inside them, but they are considered inedible.
Images of the structure of figs
Information Sources: HowStuffWorks, Encyclopedia Britannica, Wikipedia
Images: Sergio Jansen Gonzalez on Flickr; Allison H on Flickr; Encyclopædia Britannica, Inc.