Only its Nordic neighbours Norway and Iceland scored higher in the ranking.
A total of 20 countries (home to only 4.5 percent of the global population) were judged to be 'fully democratic' while the rest of the 167 countries included in the survey were classed as 'flawed democracies'.
The index was based on the following categories: electoral process and pluralism, the functioning of government, political participation, democratic political culture and civil liberties. Overall, 2018 was the first time in three years that the overall score remained stable, with more countries improving their score than declining.
Sweden celebrated one century of democracy in 2018, and held a general election the same year. Turnout was up on the previous election, but the vote led to a very close result between the two major blocs. The country is still without a new government.
From the start of 2019, Sweden's electoral law was updated with a requirement that the area where ballot papers are located in a polling place must be hidden from view from other voters. This is in order to better guarantee voter secrecy, since Sweden's ballot papers have the name and logo of the chosen party on them.
The law change followed a report from international observers monitoring Sweden's election for the first time, which recommended improved secrecy as well as tighter rules on campaign funding.
IN DEPTH: How robust is Sweden's democracy? (Clue: not very)