As the core business of the banking system is to lend money and then get it back, loan default is one of the most crucial issues for commercial banks. With data analysis and artificial intelligence, extracting valuable information from historical data, to lower their losses, banks would be able to classify their customers and predict the probability of credit repayment instead of relying on traditional methods. As most actual research is focused on individuals' loans, the novelty of the present paper is to treat corporate loans. Its main objective is to propose a model to address the problem using selected machine learning algorithms to classify companies into two classes to be able to predict loan defaulters. This paper delves into the Corporate Loan Default Prediction Model (CLD PM), which is designed to forecast loan defaults in corporations. The model is grounded in the CRISP-DM process, commencing with comprehending corporate requirements and implementing classification techniques. The data acquisition and preparation phase are critical in testing the selected algorithms, which involve Logistic Regression, Decision Tree, Support Vector Machine, Random Forest, XGBoost, and Adaboost. The model's efficacy is assessed using various metrics, namely Accuracy, Precision, Recall, F1 score, and AUC. Subsequently, the model is scrutinized using an actual dataset of loans for Moroccan real estate firms. The findings reveal that the Random Forest and XGBoost algorithms outperformed the others, with every metric surpassing 90%. This was accomplished by utilizing SMOTE as an oversampling method, given the dataset's imbalance. Furthermore, when concentrating on financial statements, selecting the five most significant financial ratios and the company's age, Random Forest was adept at predicting defaulters with good results: accuracy of 90%, precision of 75%, recall of 50%, F1 score of 60% and AUC of 77%.