Summary In the evaluation of efficacy of a vaccine to protect against disease caused by a genetically diverse infectious pathogen, it is often important to assess whether vaccine protection depends on variations of the exposing pathogen. This problem can be viewed within the framework of a K-competing risks model where the endpoint event is pathogen-specific infection and the cause of failure is the strain type determined after the infection is diagnosed. The Cox model with time-dependent coefficients is used to relate the cause-specific outcomes to explanatory variables to allow for time-varying treatment effects. The strain-specific vaccine efficacy can be defined in terms of one minus the cause-specific hazard ratios. We develop inferential methods for testing whether the vaccine affords some protection against at least one pathogen strain, and for testing equal vaccine protection against the strains, adjusting for covariate effects. We also consider estimation of covariate-adjusted time-varying strain-specific vaccine efficacy. The methods are applied to a dataset from an oral cholera vaccine trial and the performances of the proposed tests are studied through simulations. These techniques apply more generally for testing and estimation of time-varying cause-specific hazard ratios.