Two sister species, A and B, are distributed along a continuous elevational gradient in the Himalayas. Species A is distributed from the foothills to 1800 metres above sea level and species B is distributed from 1800 to 3500 metres above sea level. Which one of the following modes of speciation best explains their distribution?