An experiment was conducted to investigate the effects of dietary inclusion of rye, a model ingredient to increase gut viscosity, between 14 and 28 days of age on immune competence related parameters and performance of broiler. A total number of 960 one-day-old male Ross 308 chicks were weighed and randomly allocated to 24 pens (40 birds per pen), and the birds in every 8 replicate pens were assigned to one of three experimental diets including graded levels, 0%, 5%, and 10% of rye. Tested immune competence related parameters were composition of the intestinal microbiota, genes expression in gut tissue, and gut morphology. The inclusion of 5% or 10% rye in the diet (d14-28) resulted in decreased performance and litter quality, but in increased villus height and crypt depth in the small intestine (jejunum) of the broilers. Relative bursa and spleen weights were not affected by dietary inclusion of rye. In the jejunum, no effects on number and size of goblet cells, and only trends on microbiota composition in the digesta were observed. Dietary inclusion of rye affected expression of genes involved in cell cycle processes of the jejunal enterocyte cells, thereby influencing cell growth, cell differentiation and cell survival, which in turn were consistent with the observed differences in the morphology of the gut wall. In addition, providing rye-rich diets to broilers affected the complement and coagulation pathways, which are parts of the innate immune system. These pathways are involved in eradicating invasive pathogens. Overall, it can be concluded that inclusion of 5% or 10% rye to the grower diet of broilers had limited effects on performance. Ileal gut morphology, microbiota composition of jejunal digesta, and gene expression profiles of jejunal tissue, however, were affected by dietary rye inclusion level, indicating that rye supplementation to broiler diets might affect immune competence of the birds.