OBJECTIVE: To develop and evaluate a deep learning (DL) system for predicting the contact and relative position relationships between the mandibular third molar (M3) and inferior alveolar canal (IAC) using panoramic radiographs (PRs) for preoperative assessment of patients for M3 surgery. STUDY DESIGN: In total, 279 PRs with 441 M3s from individuals aged 18-32 years were collected, with one PR and cone beam computed tomography (CBCT) scan per individual. Six DL models were compared using 5-fold cross-validation. Model performance was evaluated using accuracy, precision, recall, specificity, F1-score, and area under the receiver operating characteristic (AUROC) curve. System performance was compared to that of experienced dentists. The diagnostic performance was investigated based on the reference standard for contact and relative position between M3 and IAC as determined by CBCT. RESULTS: ResNet50 exhibited the best performance among all models tested. For contact prediction, ResNet50 achieved an accuracy of 0.748, F1-score of 0.759, and AUROC of 0.811. For relative position relationship prediction, ResNet50 yielded an accuracy of 0.611, F1-score of 0.548, and AUROC of 0.731. The DL system demonstrated advantages over experienced dentists in diagnostic outcomes. CONCLUSIONS: The developed DL system shows broad application potential for comprehensive spatial relationship recognition between M3 and IAC. This system can assist dentists in treatment decision-making for M3 surgery and improve dentist training efficiency.