We will describe Bayesian population reconstruction, a recent method for estimating past populations by age for all countries, including developing countries where data on past populations are fragmentary and of variable quality. Such reconstructions are needed for the World Population Prospects, a comprehensive set of demographic statistics for all countries issued by the United Nations and updated every two years. The method simultaneously estimates past age-specific population counts, fertility rates, mortality rates and net international migration flows, synthesizing different data sources while formally accounting for measurement error. It embeds a standard Leslie matrix or cohort-component demographic projection in a hierarchical statistical model. We will extend the method to reconstruct two-sex populations, including values of the sex ratio at birth (SRB) and sex ratios of mortality (SRM). There is great interest in the recent evolution of SRBs and SRMs, particularly in Asia, and we will show results for several Asian countries. This is joint work with Mark Wheldon, Sam Clark and Patrick Gerland.