The United States is less capable of managing security issues within its borders than 32 other nations, including France and Belgium, according to a new global ranking.

Singapore is the most capable of maintaining domestic security in the world, while Nigeria is least able, according to the inaugural World Internal Security and Police Index.

Researchers at the Institute for Economics and Peace scored 127 countries on a scale of 0 to 1, using 16 indicators such as the number of police and internal security officers, the ratio of prisoner to official prison capacity, and public safety perceptions. Higher scores indicate better capacity.

Singapore’s top ranking was a result of having one of the world’s highest rates of police and armed-services personnel per 100,000 people, and some of the lowest crime and homicide rates, according to the report. Plus, the city-state has not had a recorded terrorist incident since 1998.

The U.S. scored 0.724, behind Belgium’s 0.793 and France’s 0.777, nations recently targeted by the Islamic State in Iraq and the Levant for major terror attacks.

One explanation for the poor U.S. showing may be the size of its population, estimated at about 321 million in 2015. Countries with fewer people performed better on the index than larger ones.

Germany was the only one in the top 10 that had more than 25 million, according to the report, which was commissioned by the International Police Science Association and the United Arab Emirate’s Sharjah Police Department. Cameroon was the only nation among the bottom 10 which had fewer than 25 million residents.

Having a high ratio of security resources to citizens didn’t guarantee a better score. “A certain baseline level of police capacity is necessary to achieve good processes, to be seen as legitimate, and to achieve good internal security outcomes,” but excess capacity beyond this baseline is detrimental, the report said.

Spending on policing and criminal justice has dramatically increased over the past five decades. For example, the United States spent five times more on police and 10 times more on the prison system last year than it did in 1961, while per capita gross domestic product increased 191 percent in the same period, according to the report.

The surge in spending reflects a shift in the nature of violent conflicts. Since the end of World War II, interstate clashes have become less common while the frequency of intrastate turmoil, such as insurgencies, civil wars, social unrest and crime steadily rose, data showed.

That trend is expected to continue as more refugees flee fighting inside Syria and Iraq and more people continue to die in terrorist attacks, according to the report.