Most HIV infections originate from individuals who are undiagnosed and unaware of their infection. Estimation of this quantity from surveillance data is hard because there is incomplete knowledge about (i) the time between infection and diagnosis (TI) for the general population, and (ii) the time between immigration and diagnosis for foreign-born persons. We developed a new statistical method for estimating the incidence of HIV-1 and the number of undiagnosed people living with HIV (PLHIV), based on dynamic modelling of heterogeneous HIV-1 surveillance data. The methods consist of a Bayesian non-linear mixed effects model using multiple biomarkers to estimate TI of HIV-1-positive individuals, and a novel incidence estimator which distinguishes between endogenous and exogenous infections by modelling explicitly the probability that a foreign-born person was infected either before or after immigration. The incidence estimator allows for direct calculation of the number of undiagnosed persons. The new methodology is illustrated combining heterogeneous surveillance data from Sweden between 2003 and 2015. A leave-one-out cross-validation study showed that the multiple-biomarker model was more accurate than single biomarkers (mean absolute error 1.01 vs ?1.95). We estimate that 816 [95% credible interval (CI) 775-865] PLHIV were undiagnosed in 2015, representing a proportion of 10.8% (95% CI 10.3-11.4%) of all PLHIV. Here, the proposed methodology will enhance the utility of standard surveillance data streams and will be useful to monitor progress towards and compliance with the 90?90-90 UNAIDS target.