We construct the most general local solutions to 11-dimensional supergravity (or M theory), which are invariant under the superalgebra Dð2; 1; c 0 ; 0Þ È Dð2; 1; c 0 ; 0Þ for all values of the parameter c 0 . The BPS constraints are reduced to a single linear partial differential equation on a complex function G. The physical fields of the solutions are determined by c 0 , a freely chosen harmonic function h, and the complex function G. h and G are both functions on a two-dimensional compact Riemannian manifold. We obtain the expressions for the metric and the field strength in terms of G, h, and c 0 and show that these are indeed valid solutions of the Einstein, Maxwell, and Bianchi equations. Finally we give a construction of one parameter deformations of AdS 7 Â S 4 and AdS 4 Â S 7 as a function of c 0 .