Context. Asteroid 2867 Steins is the first target of the Rosetta space mission with a flyby scheduled in September 2008. Aims. An early characterization is needed to optimize the flyby parameters and the science operations and to maximize the scientific return. The aim of this article is to characterize the photometric properties of this asteroid. Methods. The asteroid was imaged with the Narrow Angle Camera (NAC) of the Optical, Spectroscopic, and Infrared Remote Imaging System (OSIRIS) during the cruise phase of the Rosetta spacecraft, at a phase angle of 41.7° significantly larger than achievable from Earth. It was continuously monitored over ∼24 h (on 11 March 2006), thus covering four rotational periods, at a temporal cadence of 6 min. An accurate photometric calibration was obtained from the observations of a solar analog star, 16 Cyg B. Results. The light curve in the R photometric band of the Johnson-Kron-Cousins system has a mean value R(1, 1, α = 41.7°) = 14.13 ± 0.03 and an amplitude of 0.25 ± 0.04 mag. The periodicity was analyzed with different techniques yielding a mean value of the synodic rotational period of 6.054 ± 0.003 h. By combining with ground-based observations obtained at different phase angles, the phase function is constructed and characterized by a linear part having a phase coefficient β = 0.025 ± 0.001 mag/deg and a mean value R(1, 1, 0) = 13.10 ± 0.04. In terms of the H-G formalism, the best fit photometric values are G = 0.35 ± 0.05 and H = 12.84 ± 0.07, but the resulting opposition surge of 0.25 mag, although typical of E-type asteroids, is not really constrained because of the lack of data at phase angles below 7°. Altogether the photometric properties of asteroid 2867 Steins (phase function, color and albedo) indicate that it is a somewhat extreme E-type object, although it is known that this quite small population exhibits at least three different surface mineralogies.