The threat of the new pandemic influenza A(H1N1)pdm09 imposed a heavy burden on the public health system in Finland in 2009-2010. An extensive vaccination campaign was set up in the middle of the first pandemic season. However, the true number of infected individuals remains uncertain as the surveillance missed a large portion of mild infections. We constructed a transmission model to simulate the spread of influenza in the Finnish population. We used the model to analyse the two first years (2009-2011) of A(H1N1)pdm09 in Finland. Using data from the national surveillance of influenza and data on close person-to-person (social) contacts in the population, we estimated that 6% (90% credible interval 5.1 - 6.7%) of the population was infected with A(H1N1)pdm09 in the first pandemic season (2009/2010) and an additional 3% (2.5 - 3.5%) in the second season (2010/2011). Vaccination had a substantial impact in mitigating the second season. The dynamic approach allowed us to discover how the proportion of detected cases changed over the course of the epidemic. The role of time-varying reproduction number, capturing the effects of weather and changes in behaviour, was important in shaping the epidemic. 