Let \kappa>0 and (X, \rho) be a complete CAT(\kappa) space whose diameter smaller than \dfrac{\pi}{2\sqrt{\kappa}}. It is shown that if K is a nonempty compact convex subset of X, then K is the closed convex hull of its set of extreme points. This is an extension of the Krein-Milman theorem to the general setting of CAT(\kappa) spaces.