We present a new distance characterization of Aleksandrov spaces of nonpositive curvature. By introducing a quasilinearization for abstract metric spaces we draw an analogy between characterization of Aleksandrov spaces and inner product spaces; the quasi-inner product is defined by means of the quadrilateral cosine-a metric substitute for the angular measure between two directions at different points. Our main result states that a geodesically connected metric space (M, ρ) is an Aleksandrov 0 domain (also known as a CAT (0) space) if and only if the quadrilateral cosine does not exceed one for every two pairs of distinct points in M. We also observe that a geodesically connected metric space (M, ρ) is an 0 domain if and only if, for every quadruple of points in M, the quadrilateral inequality (known as Euler's inequality in R 2 ) holds. As a corollary of our main result we give necessary and sufficient conditions for a semimetric space to be an 0 domain. Our results provide a complete solution to the Curvature Problem posed by Gromov in the context of metric spaces of non-positive curvature.