In this paper we present a mathematical definition of fitness in general structured metapopulation models. We apply the theory to a model structured by local population size and in which local dynamics is explicitly modeled. In particular, we calculate the evolutionary stable dispersal strategy in the case where only dispersal is subject to evolutionary control but all other model ingredients are assumed fix. In this case we show that there exists a threshold size such that at ESS everyone should stay as long as the population size is below the threshold and everyone should disperse immediately as the population size reaches the threshold.