The development of digital technology has influenced students’ morals and behavior, particularly at the junior high school level. Although digital media can support the learning process, its increasingly widespread use has also raised various moral issues in the school environment. This study aims to analyze the optimization of the role of Islamic Religious Education (PAI) teachers in overcoming students’ moral degradation in the digital era at SMP Negeri 1 Peterongan. This study used a qualitative approach with a descriptive design. Data were collected through observation, interviews, and documentation involving PAI teachers, students, and school stakeholders. The data were analyzed using the interactive model of Miles and Huberman, which includes data reduction, data display, and conclusion drawing, while data validity was strengthened through source triangulation and technique triangulation. The results showed that students’ moral degradation was marked by declining discipline, reduced respect for teachers, misuse of digital devices, and weak behavioral control. This condition was influenced by internal factors in the form of students’ habits and self-control abilities, as well as external factors in the form of exposure to social media, peer influence, and limited parental supervision. In addressing these problems, PAI teachers optimized their roles as educators, role models, motivators, and counselors through religious habituation, personal approaches, exemplary conduct, spiritual motivation, and supervision of students’ behavior. These findings contribute to the development of studies on character education based on Islamic values in the context of the digital era. The conclusion of this study emphasizes that addressing students’ moral degradation requires the continuous and integrated optimization of the role of PAI teachers through synergy among schools, families, and communities.