This study aimed to compare feed intake, digestion, rumen fermentation parameters and bacterial community of 5 beef cows, 12 crossed ewes and 12 goats grazing together in spring-early summer on heather-gorse vegetation communities with an adjacent area of improved pasture. Organic matter intake (OMI) and digestibility (OMD) were estimated using alkane markers. Ruminal fluid samples were collected for measuring fermentation parameters, and studying the bacterial community using terminal restriction fragment length polymorphism (T-RFLP). Spot samples of urine were taken to determine purine derivative (PD) and creatinine concentrations to estimate microbial protein synthesis in the rumen. Herbaceous species were the main dietary component in all animal species. Cattle had higher (p < 0.05) daily OMI (g/kg LW0.75 ) and OMD, whereas sheep and goats showed similar values. The highest ammonia concentration was observed in sheep. Total VFA, acetate and butyrate concentrations were not influenced by animal species, while propionate concentrations in goats were 1.8 times lower (p < 0.05) than in sheep. Acetate:propionate ratio was greater (p < 0.05) in goats, whereas cattle excreted more allantoin (p < 0.05). Estimated supply of microbial N was higher in cows (p < 0.01), whereas the efficiency of microbial protein synthesis was lower (p < 0.01) in this animal species. Hierarchical clustering analysis indicated a clear effect of animal species on rumen bacterial structure. Differences among animal species were also observed in the relative frequency of several T-RFs. Certain T-RFs compatible with Lachnospiraceae, Proteobacteria and Clostridiales species were not found in goats, while these animals showed high relative frequencies of some fragments compatible with the Ruminococcaceae family that were not detected in sheep and cattle. Results suggest a close relationship between animals' grazing behaviour and rumen bacterial structure and its function. Goats seem to show a greater specialization of their microbial populations to deal with the greater fibrous and tannin content of their diet.