To describe dietary patterns (DP) from 1996 to 2006 and in the first 5 years of life and to explore individual and contextual characteristics associated with each DP. DP were defined by principal component analysis. The association between DP and individual (sociodemographic, maternal and child) and contextual (geographic regional and year) characteristics was analysed by multilevel analysis. Two complex probabilistic Brazilian Demographic and Health Surveys (BDHS 1996, 2006). Brazilian children under 5 years of age. DP1 included yoghurt, vegetables, fruits, tubers, red meat. DP2 included liquids, milk, fruits, egg/chicken/fish, red meat, breast milk (negative loading). DP3 included fruit juices, 'papilla', yoghurt, red meat (negative loading). DP4 included formulas, milk, enriched 'papilla', egg/chicken/fish (negative loading). DP prevalence within the age range from 1996 to 2006 remained constant for DP1; increased after 12 and 6 months, respectively, for DP2 and DP3; and decreased for DP4. DP1 was explained by higher maternal education, wealth, lower number of children at home; DP2 by living in rural area and younger mothers; and DP4 by lower maternal education and wealth. The total variance of the model attributable to geographic region was 30·2, 20·7 and 54·2 % for DP2, DP3 and DP4, respectively. DP trends observed from 1996 to 2006 show positive aspects, such as: maintenance of DP1 as the main DP after 12 months; an increase in the prevalence of DP2 and DP3 followed by a decrease of DP4 after 6 months. DP1 is explained mainly by socio-economic factors, regardless of contextual characteristics, and DP2, DP3, DP4 are partially explained by contextual effects.