LIMA (Reuters) - Peru rolled out the red carpet and heaped praise on Chinese President Xi Jinping on Monday in a celebration of tightening ties with the Asian powerhouse in the wake of Donald Trump’s surprise U.S. presidential victory.

Slideshow ( 3 images )

China surpassed the United States as Peru’s top trade partner years ago, and Peru’s centrist President Pedro Pablo Kuczynski has courted fresh Chinese investments since taking office in July, visiting China before any other country.

Trump’s election in the United States has added urgency to Peru and China’s deepening diplomacy, with his criticism of Chinese trade and Latin American migrants raising questions over the future of the U.S. role in the fast-growing Asia Pacific region.

Xi’s official visit extended the welcome he received at the APEC summit that Peru hosted through Sunday, where he promised to further open China’s economy amid concerns of protectionism.

Peru, on track to become the world’s second-biggest copper producer this year thanks to a new Chinese mine, is one of the world’s most open economies.

“Peru was the first Latin American country to sign a comprehensive free trade agreement with China. It’s leading the region on cooperation with China,” Xi said through an interpreter in a speech before Peru’s Congress.

Greeted in Lima by women who sang a welcome song in Mandarin, Xi signed a series of pacts with Kuczynski that included plans to promote Chinese mining projects, including one derailed by deadly protests in 2009.

Kuczynski, stressing the importance of cultural ties, said a local museum should explore Peruvians’ possible roots in Asian migration across Bering Strait.

“It’s vital to know where you’re from so know where you’re going,” Kuczynski said as he and Xi stood before a backdrop that blended photos of Peru’s Machu Picchu Incan ruins with the Great Wall of China.

Kuczynski joked in June that he would sever ties with the United States if Trump won the election and said this month that he would oppose the proposed wall for the U.S.-Mexico border in the United Nations.

A former Wall Street banker, Kuczynski hopes to diversify Peru’s exports to China away from copper. On Monday his government announced Peru’s first shipment of agricultural products to China by plane.

But not all Peruvians are keen on China. A leftist congressional bloc opted out of an award ceremony for Xi, saying Chinese companies put profits before workers, communities and the environment.