A metric space Y is injective if every mapping which increases no distance from a subspace of any metric space X to Y can be extended, increasing no distance, over X. In 1964,

*J. R. Isbell* constructed an injective envelope

${T}_{X}$ of a metric space X [see Comment. Math. Helv. 39, 65-76 (1964;

Zbl 0151.302)]. The present paper brings a thorough analysis of this construction and applications of it to (1) the existence of embeddings of metric spaces into trees, (2) optimal graphs realizing a metric space, and (3) the cohomological dimensions of groups with specific length functions. In more detail, a metric space X is a tree if for any two elements x,y

$\in X$ there is - up to a parametrization - only one injective continuous map

$h:[0,1]\to X$ such that

$h\left(0\right)=x$ and

$h\left(1\right)=y$. Now,

${T}_{X}$ tests the embeddability of X into a tree, i.e. X is a subspace of a tree if and only if

${T}_{X}$ is a tree. The relation of

${T}_{X}$ to optimal realizations of X by networks is a little weaker: any optimal realization of X is contained in

${T}_{X}$.