The Point of Divergence
Maggots evolve into separate species when two or more populations of one species are separated from each other, such as is the case with Darwin's finches in the Galapagos.
Various populations of the same species of bird divided onto different islands, and because of this isolation they eventually evolved apart into different species.
Apple maggots, which were originally hawthorn maggots, provide evidence that the separate evolution that is the forerunner of new species does not have to be geographical or physical.
Apples weren't introduced into North America until around 250 years ago, and some time after that, some of the hawthorn maggots shifted from feeding on hawthorn to feeding on apples, separating the maggots into two races.
Far From The Tree
The hawthorn and apple trees occupy the same lands though, so the two kinds of maggots were never physically separated. In fact, they're still the same species. By looking at them, you can't tell them apart.
However, the structure of their proteins and the food they prefer makes them quite different, clearly on their way to becoming new species. Their food preferences are so strong that scientists cannot lure them to the wrong fruit.
This goes for mating too, which occurs on the fruit. Because the two maggots are still the same species they are capable of mating together, but they don't. It's probably only a matter of time before the maggots do evolve into different species.
"Fruit Odors Lure Some Flies To Evolve Into New Species" (Science Daily)