We report the first detection of a planetary transit by spectroscopic measurements. We have detected the distortion of the stellar line profiles during a planetary transit. With the ELODIE spectrograph we took a sequence of high precision radial velocities of the star HD209458 at time of a transit of its planet. We detected an anomaly in the residuals of the orbit. The shape and the amplitude of the anomaly are modeled as a change of the mean stellar line profile resulting from the planet crossing the disk of the rotating star. The planetary orbit is in the same direction as the stellar rotation. Using the photometric transit to constrain the timing and the impact parameters of the transit, we measure an angle alpha=3.9d between the orbital plane and the apparent equatorial plane as well as a vsini=3.75(+-)1.25 kms-1. With additional constrains on the inclination of the star and on the statistics of the line of sight distribution, we can set an upper limit of 30d to the angle between the orbital plane and the stellar equatorial plane.