Gene flow is often regarded a random process that homogenizes differencesbetween populations and constrains local adaptation. However, the matching habitat choicehypothesis posits that individuals actively choose those microhabitats that best match theirspecific phenotype to maximize fitness. Dispersal (and possibly gene flow) may thus bedirected. Many studies report associations between habitats and phenotypes, but they mayreflect selection, plasticity or adaptation rather than matching choice. Here, we test twopredictions from the matching habitat choice hypothesis by manipulating the dorsal colourof Tetrix subulata, a pygmy grasshopper. (1) Is microhabitat choice flexible such thatdifferently manipulated phenotypes distribute themselves differently in a microclimaticand solar radiation mosaic? (2) If they do, are their fitness prospects higher in the morepreferred microhabitat? We find that individuals painted white or black do distributethemselves differently, with black individuals residing in habitats with less radiation, onaverage, than white individuals, demonstrating that microhabitat choices are plastic. Furthermore,white females had more hatchlings than black ones in the increased radiationtreatment, and this was mainly due to increased mortality of black females under increasedradiation. These findings provide rare experimental evidence in line with predictions fromthe matching habitat choice hypothesis.