This work advances the state of the art by presenting a transport analysis of air gap membrane distillation (AGMD) and of direct contact membrane distillation (DCMD), based on a two-dimensional conjugate model in which, the temperature and concentration of the hot and cold solutions both normal to the membrane and along it are solved, so that the sensitivity of the permeate flux to the major system parameters could be better evaluated. Employment of spacers in the flow channels for improving the process by reducing the convective resistance is also investigated. Significantly, this is the first comprehensive analysis and exposition of all resistance to heat and mass transfer in the process. The solutions were validated in comparison with available experimental results. The modeling and sensitivity analysis provide useful basic detailed information about the nature of the process, and are helpful for process improvement and optimization. Some of the principal conclusions are: (1) the air/vapor gap has the major role in reducing the parasitic heat loss in the process, (2) the gap width has an important effect: decreasing it 5-fold increases the permeate flux 2.6-fold, but the thermal efficiency improves only slightly because the conductive heat loss increases too, (3) increasing the inlet temperature of the hot solution has a major effect on the permeate flux and also increase the thermal efficiency, while decreasing the coolant temperature has a lesser effect on the flux increase, and even slightly reduces the efficiency, (4) the feedwater salt concentration has a very small effect on the permeate flux and thermal efficiency, (5) the inlet velocities of the hot and cold solutions have a relatively small effect, (6) reducing the thermal conductivity of the membrane material improves the process thermal efficiency somewhat, (7) the permeate flux of DCMD is higher than that of AGMD by about 2.3-fold at Thi = 80°C and becomes even higher for low inlet saline feedwater temperatures (at Thi = 40°C, JDCMD/JAGMD = 4.8), (8) the sensitivity of DCMD to the main process parameters is more noticeable than that in AGMD, (9) for MD it appears that the central type is the most effective one, and can improve the flux by about 33% over the empty channel. (Abstract shortened by UMI.