RTX2U3Y1
German, U.S. and European Union flags fly in front of the Reichstag building in Berlin, Germany, Nov. 17, 2016. Reuters

Looking for the best place in the world to live? Last year, Germany would’ve taken the cake — the country was ranked the top in the world in 2016. This year, however, Switzerland took home the No. 1 spot while Germany dropped to No. 4 overall, according to Tuesday's U.S. News & World Report ranking of 80 countries.

The explanation? “The nation was rocked by a range of events — from growing public anxiety over an influx of refugees to a string of deadly terror attacks,” according to a news release.

Germany was the target of several terrorist attacks in 2016, including an incident at a Christmas market in Berlin in December when a man drove a truck into a crowd of people, killing 12. Germany has also received the vast majority of refugees seeking asylum in recent years thanks to German Chancellor Angela Merkel's open door policy — a program that's inspired significant backlash from some residents.

The U.S. News report, which accumulated data by asking 21,000 people across the world to score the countries in a wide range of categories, found that Germany’s falling status could be attributed to a lower ranking in three categories: open for business, citizenship and quality of life.

The country did, however, come in first for entrepreneurship.

“Germany, which has seen its role in the international community grow steadily since reunification, ranks number four overall,” Diedre McPhillips, data reporter at U.S. News & World Report, told Germany’s the Local. “Compared to last year, Germany ranks three spots worse in both the overall ranking and in citizenship, falling to number four and number 10, respectively.”

Germany wasn’t the only nation to see its ranking fall in 2017. The United States slipped from No. 4 in 2016 to seventh overall this year. The U.S. ranked No. 1 in power, 18th in quality of life and third in both cultural influence and entrepreneurship.

“Despite being the foremost global power, the U.S. still faces domestic challenges, including racial tensions, income inequality and an increasingly polarized electorate,” the report said.

The top five best countries were, respectively: Switzerland, Canada, the United Kingdom, Germany and Japan, according to the report. Serbia came in last, at No. 80, due to its poor scores in all of the categories.