Abstract There has been discrepancy between the pre-calculated and actual T&D values, because of the dependence of the model’s predictability on assumed inputs. Therefore, to have a reliable model, the users must adjust the model inputs; mainly friction coefficient in order to match the actual T&D. This, however, can mask downhole conditions such as cutting beds, tight holes and sticking tendencies. This paper aims to introduce a machine learning model to predict the continuous profile of the surface drilling torque to detect the operational issues in advance. Actual data of Well-1, starting from the time of drilling a 5-7/8-inch horizontal section until one day prior to the stuck pipe event, was used to train and test a random forest (RF) model with an 80/20 split ratio, to predict the surface drilling torque. The input variables for the model are the drilling surface parameters, namely: flow rate, hook load, rate of penetration, rotary speed, standpipe pressure, and weight-on-bit. The developed model was used to predict the surface drilling torque, which represents the normal trend for the last day leading up to the stuck pipe incident in Well-1. Then the model was integrated with a multivariate metric distance, Mahalanobis, to be used as a classifier to measure how close an actual observation is from the predictive normal trend. Based on a pre-determined threshold, each actual observation was labeled as "NORMAL" or "ANOMAL".