We prove, via an elementary variational method, one-dimensional ͑1D͒ and two-dimensional ͑2D͒ localization within the band gaps of a periodic Schrödinger operator for any mostly negative or mostly positive defect potential, V, whose depth is not too great compared to the size of the gap. In a similar way, we also prove sufficient conditions for 1D and 2D localization below the ground state of such an operator. Furthermore, we extend our results to 1D and 2D localization in d dimensions; for example, by a linear or planar defect in a three-dimensional crystal. For the case of D-fold degenerate band edges, we also give sufficient conditions for localization of up to D states.