Locking by means of elastic deformation