Pigs are a social species and they stablish hierarchies for a better use of resources and to reduce conflicts. However, in pig production, the opportunities for growing can differ in dominant and subordinate animals. In the present study a system was tested to perform a Dominance versus Subordinate test in growing pigs to investigate how the hierarchy affects feeding behaviour, growth and gut microbiota assessed in faeces. 64 animals housed in eight different pens were used, with four castrated males and four females in each one, weighing 18kg at arrival and maintained during the whole growing period, until 140 kg. Three stool samplings were obtained from the animals directly from the anus to avoid contamination of the faeces on 58, 100 and 133 days after the start of the study to investigate the microbiota composition. The dominant animals had higher gains during the growing period that the subordinate. In addition, they were performing more visits to the feeder throughout the day. Differential abundance patterns were observed in five bacterial genera, Oliverpabstia, Peptococcus, and Faecalbacterium being more abundant in dominant animals and Holdemanella and Acetitomaculum being overrepresented in subordinate ones. This microbial biomarker accurately classified dominant versus subordinate groups of samples with an AUC of 0.92.