In this paper, the generation of a single ultrashort and coherent relativistic electron bunch (relativistic electron mirror) during interaction of an ultraintense femtosecond laser pulse having a sharp enough rising edge (nonadiabatic laser pulse) with a thin plasma layer is considered. It is shown that due to the action of the radiation reaction forces the Coulomb repulsion among the bunch electrons is partially compensated and the initial geometry of the bunch is supported in the acceleration process. Besides, the bunch can be compressed by many times in the longitudinal direction at the initial stage of interaction with the front of the nonadiabatic laser pulse. As a result, all of the bunch electrons can be synchronously accelerated to ultrarelativistic velocities during the first several half periods of the external electromagnetic field that can correspond to time intervals of hundreds of femtoseconds in the laboratory frame. The characteristics of the accelerated electron bunches for different laser-plasma parameters (shape of laser pulse, initial density of electrons in the target, and initial target thickness) are investigated. One possible application for relativistic electron mirrors is considered. It is shown that the reflection of a probe counter-propagating laser pulse from such a mirror can produce intense, ultrashort, and coherent hard x-ray pulse. The spectrum of the frequency up-shifted radiation is investigated.