We study the evolution of the dispersal rate in a metapopulation model with extinction and colonization dynamics, akin to the model as originally described by Levins. To do so we extend the metapopulation model with a description of the within patch dynamics. By means of a separation of time scales we analytically derive a fitness expression from first principles for this model. The fitness function can be written as an inclusive fitness equation (Hamilton's rule). By recasting this equation in a form that emphasizes the effects of competition we show the effect of the local competition and the local population size on the evolution of dispersal. We find that the evolution of dispersal cannot be easily interpreted in terms of avoidance of kin competition, but rather that increased dispersal reduces the competitive ability. Our model also yields a testable prediction in term of relatedness and life-history parameters.