Background. A catheter-associated urinary tract infection (CA-UTI) is preceded by biofilm formation, which is related to several risk factors such as gender, age, diabetic status, duration of catheterization, bacteriuria before catheterization, virulence gene factor, and antibiotic usage. Aims. This study aims to identify the microbial composition of catheter samples, including its corresponding comparison with urine samples, to determine the most important risk factors of biofilm formation and characterize the virulence gene factors that correlate with biofilm formation. Methods. A longitudinal cross-sectional study was conducted on 109 catheterized patients from September 2017 to January 2018. The risk factors were obtained from the patients' medical records. All catheter and urine samples were cultured after removal, followed by biomass quantification. Isolate identification and antimicrobial susceptibility testing were performed using the Vitex2 system. Biofilm-producing bacteria were identified by the Congo Red Agar (CRA) method. A PCR test characterized the virulence genes of dominant bacteria (E. coli). All data were collected and processed for statistical analysis. Results. Out of 109 catheterized patients, 78% of the catheters were culture positive, which was higher than those of the urine samples (37.62%). The most common species isolated from the catheter cultures were Escherichia coli (28.1%), Candida sp. (17.8%), Klebsiella pneumoniae (15.9%), and Enterococcus faecalis (13.1%). E. coli (83.3%) and E. faecalis (78.6%) were the main isolates with a positive CRA. A statistical analysis showed that gender and duration prior to catheterization were associated with an increased risk of biofilm formation p<0.05. Conclusion. E. coli and E. faecalis were the most common biofilm-producing bacteria isolated from the urinary catheter. Gender and duration are two risk factors associated with biofilm formation, therefore determining the risk of CAUTI. The presence of PapC as a virulence gene encoding pili correlates with the biofilm formation. Biofilm-producing bacteria, female gender, duration of catheterization (more than five days), and PapC gene presence have strong correlation with the biofilm formation. To prevent CAUTI, patients with risk factors should be monitored by urinalysis tests to detect earlier the risk of biofilm formation.