Variability on time scales delta t < t is observed in many gamma-ray burst afterglows. It is well known that there should be no such variability if the afterglow is emitted by external shock, which is produced by the interaction of ultrarelativistic ejecta with the ambient interstellar medium, within the framework of simple models. The corresponding constraints were established by Ioka et al. (2005) and in some cases are inconsistent with observations. On the other hand, if the motion is not relativistic, then the fast variability of the afterglow can be explained much more easily. In this connection we discuss various estimates of the time of the transition to subrelativistic motion in GRB source. We point out, that this transition should occur on an observed time scale of ~10 days. In the case of a higher density of the ambient interstellar medium ~10^2-10^4 cm^{-3} or dense stellar wind with dot M ~ 10^{-5} - 10^{-4} M_odot/year the transition to a subrelativistic motion can occur on a time scale of ~1 day. These densities may well be expected in star-forming regions and around massive Wolf-Rayet stars.