  A loop is said to be automorphic if its inner mappings are automorphisms. For
a prime $p$, denote by $\mathcal A_p$ the class of all $2$-generated
commutative automorphic loops $Q$ possessing a central subloop $Z\cong \mathbb
Z_p$ such that $Q/Z\cong\mathbb Z_p\times\mathbb Z_p$. Upon describing the free
$2$-generated nilpotent class two commutative automorphic loop and the free
$2$-generated nilpotent class two commutative automorphic $p$-loop $F_p$ in the
variety of loops whose elements have order dividing $p^2$ and whose associators
have order dividing $p$, we show that every loop of $\mathcal A_p$ is a
quotient of $F_p$ by a central subloop of order $p^3$. The automorphism group
of $F_p$ induces an action of $GL_2(p)$ on the three-dimensional subspaces of
$Z(F_p)\cong (\mathbb Z_p)^4$. The orbits of this action are in one-to-one
correspondence with the isomorphism classes of loops from $\mathcal A_p$. We
describe the orbits, and hence we classify the loops of $\mathcal A_p$ up to
isomorphism.
  It is known that every commutative automorphic $p$-loop is nilpotent when $p$
is odd, and that there is a unique commutative automorphic loop of order $8$
with trivial center. Knowing $\mathcal A_p$ up to isomorphism, we easily obtain
a classification of commutative automorphic loops of order $p^3$. There are
precisely $7$ commutative automorphic loops of order $p^3$ for every prime $p$,
including the $3$ abelian groups of order $p^3$.
