New degrees of freedom can be optimized in mask shapes when the source is also adjustable, because required image symmetries can be provided by the source rather than the collected wave front. The optimized mask will often consist of novel sets of shapes that are quite different in layout from the target integrated circuit patterns. This implies that the optimization algorithm should have good global convergence properties, since the target patterns may not be a suitable starting solution. We have developed an algorithm that can optimize mask and source without using a starting design. Examples are shown where the process window obtained is between two and six times larger than that achieved with standard reticle enhancement techniques (RET). The optimized masks require phase shift, but no trim mask is used. Thus far we can only optimize two-dimensional patterns over small fields (periodicities of ∼1 μm or less), though patterns in two separate fields can be jointly optimized for maximum common window under a single source. We also discuss mask optimization with fixed source, source optimization with fixed mask, and the retargeting of designs in different mask regions to provide a common exposure level. © 2002 Society of Photo-Optical Instrumentation Engineers.