A study says the U.S. is above average when it comes to cybersecurity, but it’s not the best nation.

The United States ranks fifth among 60 nations in a study released last week comparing cybersecurity measures across numerous factors, including malware rates and cybersecurity-related legislation.

Japan, France, Canada and Denmark all scored higher than the U.S., according to a study by tech research firm Comparitech.com. Ireland, Sweden, the United Kingdom, Netherlands and Singapore rounded out the top 10 nations for best cybersecurity.

The firm scored nations based on seven criteria, with a substantial portion of the scores based on the percentage of cybersecurity attacks each nation faced in 2018. Researchers said countries’ preparedness for cyberattacks were scored using data compiled in the Global Cybersecurity Index. The study weighted the following criteria equally:

The percentage of mobile devices infected with malware—software designed to gain unauthorized access to, destroy or disrupt a device’s system.

The percentage of computers infected with malware.

The number of financial malware attacks used to steal a user’s money from the bank account on their computer system.

The percentage of telnet attacks by originating country.

The percentage of attacks by cryptominers—software that’s developed to take over a user’s computer and use its resources to mine currency without the user’s permission.

The best-prepared countries for cyberattacks.

The countries with the most up-to-date legislation.

The least cyber-secure country in the world was Algeria, according to the report, in large part because it rated lowest in cyber legislation and highest in malware rates. Indonesia, Vietnam, Tanzania, Uzbekistan, Bangladesh, Pakistan, Belarus, Iran and Ukraine rounded out the bottom 10.