Given a random sample of size $n$ from an unknown continuous distribution function $F$, we consider the problem of estimating $F$ nonparametrically from a decision theoretic approach. In our treatment, we assume the Kolmogorov-Smirnov loss function and the group of all one-to-one monotone transformations of real numbers onto themselves which leave the sample values invariant. Under this setup, we obtain a best invariant estimator of $F$ which is shown to be unique. This estimator is a step function with unequal amounts of jumps at the observations and is an improper distribution function. It is remarked that this estimator may be used in constructing the best invariant confidence bands for $F$, and also in carrying out a goodness-of-fit test.