The P Cygni line profiles observed in the spectrum of broad absorption-line quasars, supernovae, etc., are sometimes characterized by very large Doppler velocities. In order to interpret more accurately such profiles, we have generalized the Sobolev theory for the transfer of line radiation to the case of the special relativity. Considering spherically symmetric expanding envelopes, we first discuss the deformations suffered by the surfaces of equal frequency when the velocities become comparable to that of light. For a single line formed in an atmosphere with a monotonic velocity field, we note the possible appearance of distant interactions at very large expansion velocities, a relativistic effect which may be of considerable importance when evaluating the amplitude of radiative forces. Following a probabilistic formalism, we subsequently establish the expression of the source function and that of the line profile. We find that the relativistic P Cygni line profiles are significantly different from those computed in the framework of the classical theory: for increasing values of the terminal wind velocity, the red emission wing becomes definitely narrower than the blue one while the line center emission increases. These modifications are mainly due to the redistribution of the scattered line photons in a frequency interval which is no longer symmetrical, in accordance with the relativistic expression of the Doppler effect. We finally study the first order moment of unsaturated P Cygni line profiles and show that, in the relativistic case, this moment is still directly proportional to the mass-loss rate. For the case of slightly and strongly saturated line profiles, we compute the first-order moment curves of growth which, after normalization, are also found to be little dependent on the relativistic corrections and very useful for the determination of mass-loss rates.