BEIJING (AP) — On the surface, Chinese leader Xi Jinping’s back-to-back summits with U.S. President Donald Trump and Russia’s Vladimir Putin looked pretty similar, with formal handshakes in Beijing’s Tiananmen Square, enthusiastic greetings from flower-waving children, and marching columns of soldiers with gleaming bayonets. But the visits also revealed how different China’s relationship is with the two countries.

During Trump’s visit, China sought to stabilize ties with the United States, while Putin’s trip served to deepen its strategic partnership with Russia.