We present our astrometric observations of the small near-Earth object 2011~MD ($H sim 28.0$), obtained after its very close fly-by to Earth in June 2011. Our set of observations extends the observational arc to $73$ days, and together with the published astrometry obtained around the Earth fly-by allows a direct detection of the effect of radiation pressure on the object, with a confidence of $5sigma$. The detection can be used to put constraints on the density of the object, pointing to either an unexpectedly low value of $rho = (640 pm 330) mbox{ kg} / mbox{m} ^3$ ($68%$ confidence interval) if we assume a typical probability distribution for the unknown albedo, or to an unusually high reflectivity of its surface. This result may have important implications both in terms of impact hazard from small objects and in light of a possible retrieval of this target.