A numerical procedure, based on the theory of optimal central, is developed and used to find the Right opportunities for a manned mission to Mars. High-thrust (impulsive) missions are considered; burns can occur either inside or outside the planets' spheres of influence, Venus flyby opportunities also are exploited, anl time constraints are often present. The necessary conditions for optimality, derived to deal with such complex missions, constitute an extension of Lawden's primer vector theory. in particular, the optimal transfers that occur in a syzygistic period and that belong to the opposition class are analyzed, taking the eccentricity and inclination of the planetary orbits into account; adjustments produced by the addition of time constraints are discussed.