An extremal element x in a Lie algebra g is an element for which the space [x,[x,g]] is contained in the linear span of x. Long root elements in classical Lie algebras are examples of extremal elements. Lie algebras generated by extremal elements lead to geometries on points and lines which can be characterized as root shadow spaces of buildings. In this paper we show that, in case the rank of this building is at least 3, the Lie algebra is (up to isomorphism) uniquely defined by this geometry. This provides us with a geometric characterization of (most of the) classical Lie algebras.