Infection is preceded by colonisation of the nasopharynx, which is the ecological niche of pneumococci.