Recently it was shown that standard odd- and even-dimensional general relativity can be obtained from a $$(2n+1)$$ ( 2 n + 1 ) -dimensional Chern–Simons Lagrangian invariant under the $$B_{2n+1}$$ B 2 n + 1 algebra and from a $$(2n)$$ ( 2 n ) -dimensional Born–Infeld Lagrangian invariant under a subalgebra $${\mathcal {L}}^{B_{2n+1}}$$ L B 2 n + 1 , respectively. Very recently, it was shown that the generalized Inönü–Wigner contraction of the generalized AdS–Maxwell algebras provides Maxwell algebras of types $${\mathcal {M}}_{m}$$ M m which correspond to the so-called $$B_{m}$$ B m Lie algebras. In this article we report on a simple model that suggests a mechanism by which standard odd-dimensional general relativity may emerge as the weak coupling constant limit of a $$(2p+1)$$ ( 2 p + 1 ) -dimensional Chern–Simons Lagrangian invariant under the Maxwell algebra type $${\mathcal {M}}_{2m+1}$$ M 2 m + 1 , if and only if $$m\ge p$$ m ≥ p . Similarly, we show that standard even-dimensional general relativity emerges as the weak coupling constant limit of a $$(2p)$$ ( 2 p ) -dimensional Born–Infeld type Lagrangian invariant under a subalgebra $${\mathcal {L}}^{{\mathcal {M}}_{\mathbf {2m}}}$$ L M 2 m of the Maxwell algebra type, if and only if $$m\ge p$$ m ≥ p . It is shown that when $$m<p$$ m < p this is not possible for a $$(2p+1)$$ ( 2 p + 1 ) -dimensional Chern–Simons Lagrangian invariant under the $${\mathcal {M}}_{2m+1}$$ M 2 m + 1 and for a $$(2p)$$ ( 2 p ) -dimensional Born–Infeld type Lagrangian invariant under the $${\mathcal {L}}^{{\mathcal {M}} _{\mathbf {2m}}}$$ L M 2 m algebra.