We report the detection of the CO 4–3 , 6–5 , 9–8 , 10–9 , and 11–10 lines in the Broad Absorption Line quasar APM 08279+5255 at z = 3.9 using the IRAM 30 m telescope . We also present IRAM PdBI high spatial resolution observations of the CO 4–3 and 9–8 lines , and of the 1.4 mm dust radiation as well as an improved spectrum of the HCN ( 5–4 ) line . Unlike CO in other QSO host galaxies , the CO line SED of APM 08279+5255 rises up to the CO ( 10–9 ) transition . The line fluxes in the CO ladder and the dust continuum fluxes are best fit by a two component model , a “ cold ” component at \sim 65 K with a high density of n ( H _ { 2 } ) = 1 \cdot 10 ^ { 5 } cm ^ { -3 } , and a “ warm ” , \sim 220 K component with a density of 1 \cdot 10 ^ { 4 } cm ^ { -3 } . We show that IR pumping via the 14 \mu m bending mode of HCN is the most likely channel for the HCN excitation . From our models we find , that the CO ( 1–0 ) emission is dominated by the dense gas component which implies that the CO conversion factor is higher than usually assumed for high-z galaxies with \alpha \thinspace \approx \thinspace 5 \thinspace { { M } _ { \odot } } ( { K% \thinspace { { \thinspace km \thinspace s } ^ { -1 } } \thinspace pc ^ { 2 } } ) ^ { -1 } . Using brightness temperature arguments , the results from our high-resolution mapping , and lens models from the literature , we argue that the molecular lines and the dust continuum emission arise from a very compact ( r \approx 100 - 300 pc ) , highly gravitationally magnified ( m = 60 - 110 ) region surrounding the central AGN . Part of the difference relative to other high- z QSOs may therefore be due to the configuration of the gravitational lens , which gives us a high-magnification zoom right into the central 200-pc radius of APM 08279+5255 where IR pumping plays a significant role for the excitation of the molecular lines .