Starting from an affinely connected space, we consider a model of gravity whose fundamental field is the connection. We build up the action using as sole premise the invariance under diffeomorphisms, and study the consequences of a cosmological ansatz for the affine connection in the torsion-free sector. Although the model is built without requiring a metric, we show that the nondegenerated Ricci curvature of the affine connection can be interpreted as an emergent metric on the manifold. We show that there exists a parametrization in which the (r, ϕ)-restriction of the geodesics coincides with that of the Friedman-Robertson-Walker model. Additionally, for connections with nondegenerated Ricci we are able to distinguish between space-, time-and null-like self-parallel curves, providing a way to differentiate trajectories of massive and massless particles.