The nematic-isotropic transition for a semi-infinite sample is analyzed by means of the Maier-Saupe theory. The effect of a delocalized surface field acting on the nematic molecules, and of the incomplete interaction between the nematic molecules, are taken into account in the van der Waals approximation. We show that the existence of a surface transition is governed by the strength of the surface potential. The spatial profile of the order parameter and the degree of extra order near the walls are determined for different temperatures. The surface tension of nematic origin is calculated near the bulk transition temperature. It is estimated to be one order of magnitude smaller than the total surface tension experimentally detected with standard techniques.