Trespasses and level crossing accidents have been the most significant causes of fatalities in railway accidents in Portugal, accounting for more than 97% in 2016-2021. Given the seriousness of this problem, and since accident prevention is a core function of the railway system, IMT, the Portuguese national rail safety authority, has developed a methodology to address pedestrian-train occurrences. This approach analyses the current situation in terms of prevalent accidents and distribution of hotspots and critical zones within the network, and provides a set of mitigation measures to be applied on site, whose effectiveness will be assessed and monitored in the next stages of this project.