Age-related alterations in human gut microbiota composition have been thoroughly described, but a detailed functional description of the intestinal bacterial coding capacity is still missing. In order to elucidate the contribution of the gut metagenome to the complex mosaic of human longevity, we applied shotgun sequencing to total fecal bacterial DNA in a selection of samples belonging to a well-characterized human ageing cohort. The age-related trajectory of the human gut microbiome was characterized by loss of genes for shortchain fatty acid production and an overall decrease in the saccharolytic potential, while proteolytic functions were more abundant than in the intestinal metagenome of younger adults. This altered functional profile was associated with a relevant enrichment in "pathobionts", i.e. opportunistic pro-inflammatory bacteria generally present in the adult gut ecosystem in low numbers. Finally, as a signature for long life we identified 116 microbial genes that significantly correlated with ageing. Collectively, our data emphasize the relationship between intestinal bacteria and human metabolism, by detailing the modifications in the gut microbiota as a consequence of and/or promoter of the physiological changes occurring in the human host upon ageing.