Transformations of the relativistic variational equations for the free mechanical motion are considered. These transformations have the following symmetry: solution of the transformed equations coincides with the transformed solution of the initial equations. Correcting the principle of general covariance in GR by substituting the coordinate transformation group for the symmetry group mentioned is considered. Making the classical mechanics consistent with this extended principle leads to the necessity of the gravitational and electromagnetic fields and of the quantization phenomenon. Foundations of the quantum mechanics are analyzed in relation to these facts. A model of the quantum field marked by the limited energy is considered.