## 2 Materials and Methods  
The current work was conducted within the framework of the CORDIOPREV study (Clinical Trials.gov.Identifier: NCT00924937), an ongoing prospective, randomised, open, controlled trial in 1002 patients with coronary heart diseases (CHD) who had their last coronary event over six months before enrolling, and who followed two different healthy dietary models (a Mediterranean diet and a low-fat diet) over a period of seven years, in addition to receiving conventional treatment for CHD [31]. From the non-diabetic patients at the beginning of the CORDIOPREV study (N = 462), 107 patients were diagnosed with T2 DM after 60 months of follow-up. The diagnosis was assessed according to the ADA criteria [32]. From the patients included in this study during the follow-up, 17 patients died, and 7 patients dropped out without being diagnosed with diabetes. Faecal samples were available at baseline for a total of 319 patients who had not received treatment with antibiotics within a month before baseline sample collection; among them, 69 patients developed T2 DM during the follow-up [33]. The CORDIOPREV study protocol was approved by the Reina Sofia University Hospital Ethics and Research Committees. All the participants gave their consent to participate in the study. The trial protocols and all the amendments were approved by the Reina Sofia University Hospital Clinical Research Ethics Committee, following the Helsinki Declaration and good clinical practice. Intestinal microbiota analysis  
For the microbiota study, faecal samples were collected in plastic containers, immediately placed on dry ice for freezing and transport, and subsequently stored at \(-80\)\({}^{\circ}\)C. DNA was extracted with the commercial QIAmp DNA stool mini kit (Qiagen, Venlo, The Netherlands), quantified in a Nanodrop ND1000 spectrophotometer (Thermo Fisher Scientific, Waltham, MA, USA), and stored at \(-20\)\({}^{\circ}\)C until use. To understand the structure and diversity of the microbial populations, genetic analysis of the digestive microbiota was carried out by massive sequencing (NGS) of bacterial DNA, which was performed by amplification of rDNA fragments of the 16S region used in bacterial taxonomy. The MiSeq Desktop Sequencer platform (Illumina, San Diego, CA, USA) was used, according to the manufacturer's instructions. In the NGS sequencing study, the DNA sequences of those microorganisms selected as being at the highest risk of developing T2 DM were processed following the procedure described by the QIIME2 analysis platform. Once the low-quality sequences were removed, each of them was assigned to a potential identity (OTU) using the Bayesian classifier RDP (Ribosomal Database Project) and the SILVA database. The quantification data were used as input data for the Random Forest Classifier analysis using the randomForest package. The performance of the model was further assessed by the AUC on the test set. The pROC package was used to calculate confidence intervals for the ROC curves. Random forest classifier models were created based on the baseline full microbiota data and the most discriminant bacterial taxa in terms of T2 DM incidence selected according to the Mean Decrease Accuracy [34]. Further, 11 bacterial taxa, the genera _Phasolarctobacterium_ (phylum _Firmicutes_); _Sutterella_ (phylum _Pseudomonad_); _Paraprevotella_ and _Prevotella_ (both genera of the phylum _Bacteroidota_); _Granulicatella_, _Faecalibacterium_, _Dialister_, _Lactobacillus_, and _Anaerotruncus_ (all belonging to the phylum _Bacilota_); _Akkermansia_ (phylum _Verrucomicobia_) and _Actinomyces_ (of the phylum _Actinomycetota_) were determined by quantitative PCR and specific primers as previously described [35]. Patients in whom low quantification quality was observed for any of the bacterial taxa were discarded, leaving 294 patients (64 T2 DM incidents).