Gone are the days when America’s standing in the world was contrasted primarily with that of the Soviet Union. Instead, the United States and China now compete to be the more favored world power.

The U.S. and China engender roughly the same level of goodwill. China is particularly well-liked in Latin America and the Middle East, while the U.S. fares better in Europe and the Asia-Pacific region.

However, America’s weakening image in many nations has taken a toll on the country’s once-solid lead over China. And China’s own favorability has strengthened in recent years in Canada, Australia, Lebanon and Turkey.

Since the most recent year Pew Research Center polled in 36 nations – 2014, 2015 or 2016, depending on the country – the number of nations in which the U.S. holds a competitive advantage in favorability over China has halved, from 25 to 12. (Differences of less than 6 percentage points are considered ties.) Whereas the U.S. once had a 12-point lead over China in terms of a global median, that lead has shrunk in 2017 to 2 points.

In six nations – Spain, Mexico, Turkey, Australia, Peru and Senegal – the dynamic between the two superpowers has flipped, with China overtaking the U.S. in favorability.

And the United States’ once-significant lead over China in popularity has fallen to a virtual tie in another seven countries: Kenya, Germany, France, Brazil, Sweden, the UK and Canada.

Meanwhile, in 12 nations, people view America more favorably than they do China: Vietnam, Israel, the Philippines, South Korea, Poland, Hungary, Italy, Ghana, Japan, South Africa, Colombia and India.

A quarter-century after the collapse of the Soviet Union, Russia is viewed far less favorably than either the U.S. or China in most of the world, though America’s recent steep decline in image has improved Russia’s standing compared with that of the U.S.

America’s edge over Russia has contracted by more than 20 percentage points in 15 out of the 33 nations for which Pew Research Center has trend data on favorability toward Russia. These include Spain, France, Chile, Brazil, Italy, Australia and Tanzania.

The narrowing of the U.S.-Russia favorability gap is most striking in Mexico, where the 42-point advantage held by the U.S. over Russia in 2015 is all but gone. Mexicans now view the U.S. and Russia roughly the same.

Margaret Vice  is a former senior researcher focusing on global attitudes at Pew Research Center.