Concern has been growing for the past several years about the future of democracy, and there is considerable dissatisfaction in many countries with how democracy is working in practice. But public support for democratic ideals remains strong, and by one measure, global democracy is at or near a modern-day high.

As of the end of 2017, 96 out of 167 countries with populations of at least 500,000 (57%) were democracies of some kind, and only 21 (13%) were autocracies. Nearly four dozen other countries – 46, or 28% – exhibited elements of both democracy and autocracy. Broadly speaking, the share of democracies among the world’s governments has been on an upward trend since the mid-1970s, and now sits just shy of its post-World War II record (58% in 2016).

Democracy has grown across the world over the past four decadesTo track the spread of democracy around the globe, we used the ratings contained in the Center for Systemic Peace’s Polity IV dataset. Polity is a widely used resource in political science that analyzes and codes how political authority is gained and used in every fully independent state with a population of 500,000 or more (167 of the world’s 200 or so sovereign states in the current version).

More than half of governments are democraciesPolity assesses six key factors, from openness of political participation to constraints on the chief executive, to place each country on a 21-point scale ranging from +10 (“consolidated democracy”) to –10 (“hereditary monarchy”). It doesn’t rate countries whose central government has collapsed or those subject to foreign intervention or occupation. In 2017, there were three countries in the former group (Libya, Yemen and South Sudan) and one in the latter (Bosnia and Herzegovina).

Following the Polity guidelines, we categorized all countries scoring from +6 to +10 as democracies, those from –6 to –10 as autocracies and everything in between as “mixed.” We then tracked the changing prevalence of democracy and autocracy over the seven decades since the end of the Second World War.

In 2017, 33 countries were considered fully consolidated democracies, with a Polity rating of +10. The peak postwar year for consolidated democracies was 2006, when there were 35; since then, two (Belgium and the United States) have slipped from the top tier.

Belgium fell 2 points, to +8, following its June 2007 parliamentary election, which deepened divisions between the country’s French- and Flemish-speaking communities and sparked a long-running political crisis that at times threatened to split the country. The United States was docked 2 points in 2016 due to an increase in “factional competition,” and now also sits at +8. The Polity researchers noted that “political discourse in the United States had become increasingly partisan” during Barack Obama’s administration, and that Donald Trump “used combative rhetoric to excite ‘populist’ support and seize the Republican Party nomination.” Trump’s “surprise” Electoral College victory, they added, “polarized political competition into ‘anti-establishment’ and ‘anti-Trump’ factions.”

In 1977, only 35 of the 143 countries rated by Polity (24%) qualified as democracies, while 89 (62%) were classified as autocracies of one stripe or another (including nine absolute hereditary monarchies). Although the number of democracies began edging higher in subsequent years and the number of autocracies gradually fell, half of the Polity-rated countries were still considered autocracies as recently as 1988.

But democracy spread rapidly as the Cold War ended and the Soviet-led bloc – and eventually the Soviet Union itself – crumbled between 1989 and 1991. Of the 75 countries rated as autocracies in 1987, only 15 (20%) were still rated that way three decades later. More than a third (27) had become democracies, and most of the rest had mixed ratings. (One, Libya, was not rated in 2017 because of regime instability, and five other states had ceased to exist.) Among 30 new nations formed since 1987, 17 were rated as democracies in 2017, six were autocracies, four were mixed and three were not rated due to instability or foreign intervention.

Polity’s democracy ratings are by no means the only ones out there, though because of differing methodologies they tell somewhat different stories. Freedom House, for instance, rates 86 out of 195 countries (44%) as “free,” using criteria that include both political and civil rights. And though nearly half of the 167 countries in the Economist Intelligence Unit’s Democracy Index are considered to be some form of democracy, only 12% (20) are rated as “full democracies”; nearly a third (55 countries) are counted as “flawed democracies” – including the U.S.

Although our analysis of the Polity data indicates that more countries are democratic than not, at least formally, that doesn’t mean people are happy with democracy in action.

In a Pew Research Center survey of 27 countries conducted last year, a global median of 51% said they were dissatisfied with how democracy is working in their country, while 45% said they were satisfied. (All but one of the 27 countries in the Center’s survey are considered democratic by the Polity IV methodology; the exception is Russia, which is in the “mixed” category.)

Of the countries surveyed, Sweden and the Philippines were among those with the highest levels of popular satisfaction with democracy: 69% in each nation said they were satisfied. (Indonesia, South Korea and the Netherlands weren’t far behind.) At the other end, people in Mexico, Greece, Brazil and Spain expressed the most dissatisfaction with the state of democracy in their countries.

Note: This is an update of a post originally published Dec. 6, 2017.

Drew DeSilver  is a senior writer at Pew Research Center.