Sympatric speciation.

The apple maggot fly's original habitat was native hawthorn trees, but some populations colonized apple trees introduced by European settlers.

Apples mature more quickly than hawthorn fruit, leading to habitat differentiation.

The apple-feeding flies have been selected for rapid development, resulting in temporal isolation and reduced gene flow between the populations, even though they both live in the same geographic area.