Context. S-type AGB stars have a C/O ratio which suggests that they are transition objects between oxygen-rich M-type stars and carbon-rich C-type stars. As such, their circumstellar compositions of gas and dust are thought to be sensitive to their precise C/O ratio, and it is therefore of particular interest to examine their circumstellar properties. Aims. We present new Herschel HIFI and PACS sub-millimetre and far-infrared line observations of several molecular species towards the S-type AGB star W Aql. We use these observations, which probe a wide range of gas temperatures, to constrain the circumstellar properties of W Aql, including mass-loss rate and molecular abundances. Methods. We used radiative transfer codes to model the circumstellar dust and molecular line emission to determine circumstellar properties and molecular abundances. We assumed a spherically symmetric envelope formed by a constant mass-loss rate driven by an accelerating wind. Our model includes fully integrated H 2 O line cooling as part of the solution of the energy balance. Results. We detect circumstellar molecular lines from CO, H 2 O, SiO, HCN, and, for the first time in an S-type AGB star, NH 3 . The radiative transfer calculations result in an estimated mass-loss rate for W Aql of 4.0 × 10 −6 M yr −1 based on the 12 CO lines. The estimated 12 CO/ 13 CO ratio is 29, which is in line with ratios previously derived for S-type AGB stars. We find an H 2 O abundance of 1.5 × 10 −5 , which is intermediate to the abundances expected for M and C stars, and an ortho/para ratio for H 2 O that is consistent with formation at warm temperatures. We find an HCN abundance of 3 × 10 −6 , and, although no CN lines are detected using HIFI, we are able to put some constraints on the abundance, 6 × 10 −6 , and distribution of CN in W Aql's circumstellar envelope using ground-based data. We find an SiO abundance of 3 × 10 −6 , and an NH 3 abundance of 1.7 × 10 −5 , confined to a small envelope. If we include uncertainties in the adopted circumstellar model -in the adopted abundance distributions, etc. -the errors in the abundances are of the order of factors of a few. The data also suggest that, in terms of HCN, S-type and M-type AGB stars are similar, and in terms of H 2 O, S-type AGB stars are more like C-type than M-type AGB stars. We detect excess blue-shifted emission in several molecular lines, possibly due to an asymmetric outflow. Conclusions. The estimated abundances of circumstellar HCN, SiO and H 2 O place W Aql in between M-and C-type AGB stars, i.e., the abundances are consistent with an S-type classification.