The relationship between mean speed and crash likelihood is unclear in the literature. The contradictory findings can be attributed to the masking effects of the confounding variables in this association. Moreover, the unobserved heterogeneity has almost been criticized as a reason behind the current inconclusive results. This research provides an effort to develop a model that analyzes the mean speed-crash frequency relationship by crash severity and type. Also, the confounding and mediation effects of the environment, driver, and traffic-related attributes have been considered. To this end, the loop detector and crash data were aggregated daily for rural multilane highways of Tehran province, Iran, covering two years, 2020–2021. The partial least squares path modeling (PLS-PM) was employed for crash causal analysis along with the finite mixture partial least squares (FIMIX-PLS) segmentation to account for potential unobserved heterogeneity between observations. The mean speed was negatively and positively associated with the frequency of property damage-only (PDO) and severe accidents, respectively. Moreover, driver-related variables, including tailgating, distracted driving, and speeding, played key mediation roles in associating traffic and environmental factors with the crash risk. The higher the mean speed and the lower the traffic volume, the higher odds of distracted driving. Distracted driving was, in turn, associated with the higher vulnerable road users (VRU) accidents and single-vehicle accidents, triggering a higher frequency of severe accidents. Moreover, lower mean speed and higher traffic volume were positively correlated with the percentage of tailgating violations, which, in turn, predicted multi-vehicle accidents as the main predictor of PDO crash frequency. In conclusion, the mean speed effects on the crash risk are entirely different for each crash type through distinct crash mechanisms. Hence, the distinct distribution of crash types in different datasets might have led to current inconsistent results in the literature.