This paper deals with a Bienaymé-Galton-Watson process having a random number of ancestors. Its asymptotic properties are studied when both the number of ancestors and the number of generations tend to infinity. This yields consistent and asymptotically normal estimators of the mean and the offspring distribution of the process. By exhibiting a connection with the BGW process with immigration, all results can be transported to the immigration case, under an appropriate sampling scheme. A key feature of independent interest is a new limit theorem for sums of a random number of random variables, which extends the Gnedenko and Fahim (1969) transfer theorem.