Context : NGC 5128 ( Centaurus A ) is , at the distance of just 3.8 Mpc , the nearest easily observable giant elliptical galaxy . Therefore it is the best target to investigate the early star formation history of an elliptical galaxy . Aims : Our aims are to establish when the oldest stars formed in NGC 5128 , and whether this galaxy formed stars over a long period . Methods : We compare simulated colour-magnitude diagrams with the deep ACS/HST photometry . The simulations assume in input either the observed metallicity distribution function , based on the colour distribution of the upper red giant branch stars , or the closed box chemical enrichment . Simulations are constructed for single age bursts using BASTI evolutionary isochrones ; more complex star formation histories are constructed as well by combining several individual simulations . Comparisons with data are made by fitting the whole colour-magnitude diagram as well as the the luminosity functions in V and I band . In addition we inspect carefully the red clump and asymptotic giant branch bump luminosities and number counts , since these features are the primary constraints on the ages of the observed stars . Results : We find that that the observed colour-magnitude diagram can be reproduced satisfactorily only by simulations that have the bulk of the stars with ages in excess of \sim 10 Gyr , and that the alpha-enhanced models fit the data much better than the solar scaled ones . Data are not consistent with extended star formation over more than 3 - 4 Gyr . Two burst models , with 70-80 % of the stars formed 12 \pm 1 Gyr ago and with 20-30 % younger contribution with 2 - 4 Gyr old stars provide the best agreement with the data . The old component spans the whole metallicity range of the models ( Z = 0.0001 - 0.04 ) , while for the young component the best fitting models indicate higher minimum metallicity ( \sim 1 / 10 - 1 / 4 Z _ { \odot } ) . Conclusions : The bulk of the halo stars in NGC 5128 must have formed at redshift z \ga 2 and the chemical enrichment was very fast , reaching solar or even twice-solar metallicity already for the \sim 11 - 12 Gyr old population . The minor young component , adding \sim 20 - 30 % of the stars to the halo , and contributing less than 10 % of the mass , may have resulted from a later star formation event \sim 2 - 4 Gyr ago .