Germany has beaten the US to be named the best country in the world, according to a survey that rates nations on how they are perceived by outsiders.

America has topped the charts for the past five years in the annual Nation Brands Index produced by Anholt-GfK, which carried out more than 20,000 interviews across 20 countries.

The UK successfully held onto its third-place performance from last year, while France was ranked fourth and Canada came fifth.

The study claims to reflect “global public opinion”, and asked people to rank the 50 developed and developing countries listed based on twenty-three different attributes.

Combined, these scores meant the countries could be ranked on the value which, according to Anholt-GfK , build up a nation’s image. They were: exports, governance, culture, people, tourism and immigration/investment.

Simon Anholt, an independent policy advisor who co-produced the report, said that the interviews were carried out shortly after Germany’s footballing victory in the 2014 World Cup – likely contributing to a huge jump in its score for “sport excellence”.

The top 10 countries in the world – according to ‘global public opinion’ Show all 10 1 /10 The top 10 countries in the world – according to ‘global public opinion’ The top 10 countries in the world – according to ‘global public opinion’ 1. Germany The top 10 countries in the world – according to ‘global public opinion’ 2. United States Reuters The top 10 countries in the world – according to ‘global public opinion’ 3. United Kingdom Getty The top 10 countries in the world – according to ‘global public opinion’ 4. France Getty Images The top 10 countries in the world – according to ‘global public opinion’ 5. Canada Rex The top 10 countries in the world – according to ‘global public opinion’ 6. Japan Getty The top 10 countries in the world – according to ‘global public opinion’ 7. Italy Getty Images The top 10 countries in the world – according to ‘global public opinion’ 8. Switzerland EPA The top 10 countries in the world – according to ‘global public opinion’ 9. Australia Getty The top 10 countries in the world – according to ‘global public opinion’ 10. Sweden Getty

Conversely, the questions came at a time when recent international events made interviewees in Russia and Egypt score the US much lower for “global peace and security” than they have in previous years.

Combined, these factors go some way to explaining Germany’s new dominance as the best-perceived country in the world.

Mr Anholt said: ““Germany appears to have benefited not only from the sports prowess it displayed on the world stage at the FIFA World Cup championship, but also by solidifying its perceived leadership in Europe through a robust economy and steady political stewardship.

“Germany’s score gains in the areas of ‘honest and competent government’, ‘investment climate’, and ‘social equality’ are among the largest it achieved across all the aspects covered by the NBI 2014 survey.”

Xiaoyan Zhao, Senior Vice President and Director of NBI SM at GfK, highlighted the fact that Russia had seen the sharpest downward trend in public opinion this year. After previous rises, it has slipped three places to 25th, overtaken by Argentina, China, and Singapore.