Ulcerative colitis (UC) is an immune-mediated chronic inflammatory condition with a worldwide distribution. Although the etiology of this disease is still unknown, the understanding of the role of the microbiota is becoming increasingly strong. To investigate the predictive power of the gut microbiota for the diagnosis of UC in a cohort of newly diagnosed treatment-naïve Saudi children with UC. The study population included 20 children with a confirmed diagnosis of UC and 20 healthy controls. Microbial DNA was extracted and sequenced, and shotgun metagenomic analysis was performed for bacteria and bacteriophages. Biostatistics and bioinformatics demonstrated significant dysbiosis in the form of reduced alpha diversity, beta diversity, and significant difference of abundance of taxa between children with UC and control groups. The receiver operating characteristic curve, a probability curve, was used to determine the difference between the UC and control groups. The area under the curve (AUC) represents the degree of separability between the UC group and the control group. The AUC was calculated for all identified bacterial species and for bacterial species identified by the random forest classification algorithm as important potential biomarkers of UC. A similar method of AUC calculation for all bacteriophages and important species was used. The median age and range were 14 (0.5-21) and 12.9 (6.8-16.3) years for children with UC and controls, respectively, and 40% and 35% were male for children with UC and controls, respectively. The AUC for all identified bacterial species was 89.5%. However, when using the bacterial species identified as important by random forest classification algorithm analysis, the accuracy increased to 97.6%. Similarly, the AUC for all the identified bacteriophages was 87.4%, but this value increased to 94.5% when the important bacteriophage biomarkers were used. The very high to excellent AUCs of fecal bacterial and viral species suggest the potential use of noninvasive microbiota-based tests for the diagnosis of unusual cases of UC in children. In addition, the identification of important bacteria and bacteriophages whose abundance is reduced in children with UC suggests the potential of preventive and adjuvant microbial therapy for UC.