In some applications, the accuracy of the numerical solution of an elliptic problem needs to be increased only in certain parts of the domain. In this paper, local refinement is introduced for an overlapping additive Schwarz algorithm for the p-version finite element method. Both uniform and variable degree refinements are considered. The resulting algorithm is highly parallel and scalable. In two and three dimensions, we prove an optimal bound for the condition number of the iteration operator under certain hypotheses on the refinement region. This bound is independent of the degree p, the number of subdomains N(r) and the mesh size H. In the general two dimensional case, we prove an almost optimal bound with polylogarithmic growth in p.