Radio frequency interference (RFI) is a significant problem for current and future radio telescopes. We describe here a method for postcorrelation cancellation of RFI for the special case of an extended source observed with an interferometer that spatially resolves the astronomical signal. In this circumstance the astronomical signal is detected through the autocorrelations of each antenna but is not present in the cross correlations between antennas. We assume that the RFI is detected in both autocorrelations and cross correlations, which is true for many cases. The large number of cross correlations can provide a very high interference-to-noise ratio reference signal which can be adaptively subtracted from the autocorrelation signals. The residual signal is free of interference to significant levels. We discuss the application of this technique for detection of the spin-flip transition of interstellar deuterium with the Allen Telescope Array. The technique may also be of use for epoch of reionization experiments and with multibeam feeds on single-dish telescopes.