Identifying accident prone areas and the contributing environmental factors can save lives and enhance infrastructure durability. This research presents an innovative use of two hierarchical clustering methods (Agglomerative Hierarchical and BIRCH clustering algorithms) to detect accident hotspots with high accident rates on the Yazd-Kerman road, in Iran. These approaches identified clusters of accidents, highlighting significant clusters and categorizing their overlap as two accident prone areas. The high percentage of overlapping results from both methods indicates a high level of consistency in the findings. Through observations, field visits, police report analysis, and interviews with locals, the primary causes of accidents in accident prone areas were identified. In one of the accident prone areas, the most significant reasons for accidents included the presence of a resting area, insufficient lighting at curves, and poor road signage, which created a dilemma zone for drivers. In another accident prone area, the main contributing factor was reduced visibility during dust storms. Then, K-Nearest Neighbors and Random Forests machine learning algorithms were employed to predict the severity of accidents, using various input attributes such as lighting, climate, alignment slope, and road geometry. The K-Nearest Neighbor surpassed the Random Forest technique, achieving an overall accuracy of 71% in contrast to 60%. This study effectively evaluated the outcomes of clustering, uncovering the underlying causes of accidents to inform future practical interventions. Moreover, by predicting the severity of accidents along the road, a framework was developed to propose strategies for risk reduction.