In Portugal no major accident has happened for a long time already. There was one in 2013 that miraculously didn't have anyone severely injured. The last major accident happened in 2008 and 2007 in the Tua Line, with a total of four killed passengers, and those accidents are very controversial.
The last prominent accident happened in 2002 that killed 5 passengers, and was in a section of the Lousã Branch, which is currently closed.
Mind that all mentioned before happened in unrefurbished sections of track, with either debilitated infrastructure, or absence of ATC systems.
As far as I know, no major accident happened in Portugal in the refurbished and most traffic heavy lines, and I find myself very secured travelling on lines equipped with EBICAB/ERTMS. I can't really say the same about the UK and its AWS though.
Spain, however, already suffered two major accidents in two years, one in Santiago de Compostela with an High Speed train, and another with a leased Spanish DMU, both in "AWS" sections of track. Mind that for a second.