We present a determination of the parton distributions of the nucleon from a global set of hard scattering data using the NNPDF methodology at LO and NNLO in perturbative QCD, thereby generalizing to these orders the NNPDF2.1 NLO parton set. Heavy quark masses are included using the so-called FONLL method, which is benchmarked here at NNLO. We demonstrate the stability of PDFs upon inclusion of NNLO corrections, and we investigate the convergence of the perturbative expansion by comparing LO, NLO and NNLO results. We show that the momentum sum rule can be tested with increasing accuracy at LO, NLO and NNLO. We discuss the impact of NNLO corrections on collider phenomenology, specifically by comparing to recent LHC data. We present PDF determinations using a range of values of alpha_s, m_c and m_b. We also present PDF determinations based on various subsets of the global dataset, show that they generally lead to less accurate phenomenology, and discuss the possibility of future PDF determinations based on collider data only.
Bibliographical note80 pages, 51 figures. Final version, to be published in Nuclear Physics B. Many typos corrected and several plots improved: in particular Figs 5, 12, 19, 22, 23. Small corrections in Figs 33, 34. Refs 103-104 added - now fig 22-23 correctly updated. Typos in Tab.1 and Tab.10 (N_dat) corrected