Media playback is unsupported on your device Media caption US v China... what the world thinks

A global survey of 40 countries by the Pew Research Center finds that large numbers of people have a favourable opinion of the United States, its economy and the US-led fight against the Islamic State.

Overall, the US is largely seen in a positive light, with a global median of 69% of people saying they viewed the US favourably. That's up from 65% in 2013 and 2014, says Pew.

But when it comes to the issue of post-9/11 interrogation techniques - which many consider to be torture - the US has received a worldwide rebuke.

US v China

Image copyright Getty Images

Chinese and US officials, at the helm of the world's biggest economies, are meeting in Washington for annual talks.

While the recent global downturn stoked fears that the US was losing ground to China economically, there has actually been a rise in the number of people who think the US is still on top.

Of the 40 countries polled, a majority in 30 of them view the US as the world's biggest economic power. India has seen the biggest jump in the number of people who think the US is on top.

However, it's important to note that majorities in 27 countries believe that China will eventually replace the US as the world's top superpower.

The European Union is the most convinced of China's inevitable supremacy.

Islamic State conflict

Image copyright Getty Images Image caption US soldiers left Iraq in 2011

When it comes to the US-led fight against Islamic State, the US enjoys broad support.

A median of 62% of people around the world say that they support US military actions against the Islamic State group. That figure is compared to the 24% of people who oppose US-led efforts against the group in Iraq and Syria.

While the Iraq war that raged a decade ago was largely unpopular, majorities in America's key European allies are supportive of the campaign.

A near-majority of people in important Middle Eastern allies are supportive as well.

Back home, 80% of Americans - including 88% of Republicans and 80% of Democrats - view the campaign favourably. Across the northern border, the fight enjoys the support of about two-thirds of the Canadian public.

'Torture' after September 11 attacks

Image copyright Getty Images

What's not popular? The interrogation techniques employed by the US following the 9/11 attacks.

A median of 50% of people disapproved of the US government's interrogation techniques that it used on suspected terrorists - techniques that many described as torture.

Only 35% said the techniques were justified.

Majorities in the United Kingdom, Spain, Germany and France said the so-called torture was not justified.

Interestingly, there were some outliers. Italians were largely split on the issue, and people in Poland tended to believe that interrogation techniques were justified.

In the Middle East and Asia, the techniques were largely seen in a negative light - except in Israel, India and the Philippines.

Most Americans, though, see the techniques as justified - but sharply divided along political lines, with Republicans largely supportive and Democrats largely not.

President Barack Obama

Image copyright Getty Images

The US president, however, enjoys widespread support that, in many places, has been growing - except for in one country.

Mr Obama's popularity in Israel has taken a nosedive in Israel over the past 12 months. Last year, he had the backing of 71% of Israelis. But this year, only 49% gave him the thumbs-up.

However in India the opposite is true. Over the past year, his popularity in that country jumped from 48% to 71%. He's seen his popularity grow in 14 of the surveyed countries.

Considering people in all 40 countries around the world, Mr Obama has the backing of a median of 69% of people (much higher than his approval rating in the US).

In all the countries surveyed in the EU and sub-Saharan Africa, half or more support the American president. In 29 countries, majorities said they were confident that Mr Obama would do the right thing when it came to world affairs.

The Pew survey was conducted between March and May of this year, and included responses from over 45,000 respondents.