The electrical power system is a set of networks and assets offering a service of public nature essential for the society. Terrorist acts that can affect the power system are increasing. One of the causes is the growing activity of extremist groups from different nations around the world. This paper introduces a technique for ranking contingency resulting from terrorist acts that could represent larger risks for a system. With the use of probabilistic inference, through a Bayesian network, the contingency occurrence probability is obtained as well as the contingency severity. With the risk calculation for each contingency, a set of them is found that will be used in security analysis which will allow diminishing the number of scenarios to study. Although we do not pretend that the obtained risk measures constitute as such a security measurement of the power systems, the results allow choosing on which asset the security study must be concentrated under terrorist scenarios