Given a closed ideal I in a C*-algebra A, an ideal J (not necessarily closed) in I, a *-homomorphism a: A ->). M (I) and a map L: J -> A with some properties, based on earlier works of Pimsner and Katsura, we define a C*-algebra O(A, a, L) which we call the Crossed Product by a Partial Endomorphism. We introduce the Crossed Product by a Partial Endomorphism O(X, alpha, L) induced by a local homeomorphism (T: U -> X where X is a compact Hausdorff space and U is an open subset of X. A bijection between the gauge invariant ideals of 0 (X, a, L) and the a, or - I invariant open subsets of X is showed. If (X, sigma) has the property that (X, sigma(vertical bar)x(')) is topologically free for each closed a, sigma(-1) -invariant subset X' of X then we obtain a bijection between the ideals of 0 (X, a, L) and the open sigma, or - '-invariant subsets of X.