The effect of the radial electric field on neoclassical orbits in a tokamak using the integrals of drift motion is considered. It is shown that for the most interesting case of high radial electric field shear, due to a dramatic change of the particle orbit topology at a distance of the order of one particle orbit width, it is not correct to apply local theory to describe neoclassical transport processes. For step-like electrostatic potentials typical for the tokamak plasma periphery in the high (H) mode, the trajectories of the particles can be either squeezed or expanded depending on the location of the potential jump with respect to the unperturbed particle trajectories. The widening of the orbits decreases the threshold energy of suprathermal particles which can be promptly lost and enhances the ion prompt losses which might increase the amplitude of the potential step. It is shown that these effects are more pronounced for a diverted tokamak with the X point located at the inner side of the torus. Simultaneous growth of prompt losses and potential magnitude might be the reason for the fast formation of the narrow electrostatic barrier during the ‘‘low’’–‘‘high’’ (L–H) transition. Toroidal plasma rotation induced by the radial electric field can strongly enhance the destabilizing effect of the step-like potential.