Using 34.7 pb−1of data collected with the LHCb detector, the inclusive production of the X(3872) meson in pp collisions at √s = 7 TeV is observed for the first time. Candidates are selected in the X(3872)→J/ψπ+π−decay mode, and used to measure σ(pp→X(3872)+anything)B(X(3872)→J/ψπ+π−) = 5.4 ± 1.3 (stat) ± 0.8 (syst) nb, where σ(pp →X(3872) + anything) is the inclusive production cross section of X(3872) mesons with rapidity in the range 2.5–4.5 and transverse momentum in the range 5–20 GeV/c. In addition the masses of both the X(3872) and ψ(2S) mesons, reconstructed in the J/ψπ+π−final state, are measured to be mX(3872) = 3871.95 ± 0.48 (stat) ± 0.12 (syst) MeV/c2and mψ(2S) = 3686.12± 0.06 (stat) ± 0.10 (syst) MeV/c2.