A new construction of algebras called a mapping extension of an algebra is here introduced. The construction yields a generalization of some classical constructions such as the nilpotent extension of an algebra, inflation of a semigroup but also the square extension construction introduced recently for idempotent groupoids. The mapping extension construction is defined for algebras of any fixed type, however nullary operation symbols are here not admitted. It is based on the notion of a retraction and some system of mappings. A mapping extension of a given algebra is constructed as a counterimage algebra by a specially defined retraction. Varieties of algebras satisfying an identity φ(x) ≈ x for a term φ not being a variable (such as varieties of lattices, Boolean algebras, groups and rings) are especially interesting because for such a variety [Formula: see text], all mapping extensions by φ of algebras from [Formula: see text] form an equational class. In the last section, combinatorial properties of the mapping extension construction are considered.