We have developed a method to longitudinally classify subjects into two or more prognostic groups using longitudinally observed values of markers related to the prognosis. We assume the availability of a training data set where the subjects' allocation into the prognostic group is known. The proposed method proceeds in two steps as described earlier in the literature. First, multivariate linear mixed models are fitted in each prognostic group from the training data set to model the dependence of markers on time and on possibly other covariates. Second, fitted mixed models are used to develop a discrimination rule for future subjects. Our method improves upon existing approaches by relaxing the normality assumption of random effects in the underlying mixed models. Namely, we assume a heteroscedastic multivariate normal mixture for random effects. Inference is performed in the Bayesian framework using the Markov chain Monte Carlo methodology. Software has been written for the proposed method and it is freely available. The methodology is applied to data from the Dutch Primary Biliary Cirrhosis Study. Copyright © 2010 John Wiley & Sons, Ltd.