We develop the principle of nongravitating vacuum energy, which is implemented by changing the measure of integration in the action from √-gdDx to an integration in an internal space of D scalar fields φa. As a consequence of such a choice of the measure, the matter Lagrangian Lm can be changed by adding a constant while no cosmological term is induced. Here we develop this idea to build a new theory which is formulated through the first order formalism, for example, when using vielbein eaμ and spin connection ωμab (a,b= 1,2, ... ,D) as independent variables. The equations obtained from the variation of eaμ and the fields φa imply the existence of a nontrivial constraint. This approach can be made consistent with invariance under arbitrary diffeomorphisms in the internal space of scalar fields φa (as well as in ordinary space-time), provided that the matter model is chosen so as to satisfy the above-mentioned constraint. If the matter model is not chosen so as to satisfy automatically this constraint, the diffeomorphism invariance in the internal space is broken. In this case the constraint is dynamically implemented by the degrees of freedom that become physical because of the breaking of the internal diffeomorphism invariance. However, this constraint always dictates the vanishing of the cosmological constant term and the gravitational equations in the vacuum coincide with vacuum Einstein's equations with zero cosmological constant. The requirement that the internal diffeomorphisms be a symmetry of the theory points towards the unification of forces in nature such as in the Kaluza-Klein scheme.