China and Mexico have been friends for a long time, but after Donald Trump’s win in the US presidential elections, both countries are looking for more in their relationship.

Over the weekend, Chinese ambassador to Mexico Qiu Xiaoqi promised Mexicans his country is standing by them through the uncertain times ahead. “We are very important strategic partners, and we are willing to increase our efforts together with our Mexican counterparts to inject new energy into these relations,” he said (link in Spanish.) “We are sure that cooperation is going to be much strengthened.”

His comments were made during a press conference to launch a year of cultural festivities to celebrate the two countries’ 45 years of diplomatic relations. A day later, the two countries signed an agreement (Spanish) to expand food shipments from Mexico to China. Separately, Chinese oil major CNOOC made two handsome bids for contracts to explore Mexico’s offshore oil fields, and won.

“This means that they see Mexico as a trustworthy country,” said a beaming Pedro Joaquín Coldwell, Mexico’s energy secretary.

As the two main targets of Trump’s anti-globalization tirades, China and Mexico have a lot to commiserate about. The president-elect’s talk of tearing up trade deals, starting trade wars and closing borders irks both countries, which have big stakes on international trade. Strengthening their ties is a symbolic snub to Trump’s vision of the world.

Plus, both countries could benefit economically. Latin America is already a big piece of China’s international expansion strategy, and Mexico is one of the region’s largest markets. In turn, Mexico could use some Chinese investment at a time when it desperately needs to diversify its US-heavy portfolio. Indeed, officials and business leaders (Spanish) in Mexico are looking to China to plug the hole that US business might leave, if Trump carries through with his promises.

But before they get carried away with the potential geopolitical and economic boon of closer cooperation, a few words of caution, via Enrique Dussel Peters, who runs the China-Mexico Studies Center at Mexico’s National Autonomous University. “Given the differences with Trump, today it’s popular to postulate that China is going to be a solution for Mexico,” he said. “That could be, but today there are no concrete conditions for that.”

China and Mexico have been talking about getting closer for years, yet the results have so far been modest. The Asian country has been Mexico’s second biggest trading partner for more than a decade, but it’s an extremely uneven exchange. While Mexico’s imports from China have ballooned, its exports to the Asian country have only grown by a trickle.

Promises of Chinese capital flooding Mexico have also failed to materialize. Since 1990, Chinese companies have invested less than $300 million in Mexico, a tiny fraction of the foreign direct investment the country received over that period. For perspective, China has poured considerably more money—more than a billion dollars— into tiny Guyana, a country with a smaller population than a Mexico City suburb.

That’s because the two countries haven’t learned how to work together, says Dussel Peters. Chinese companies are more taken aback by Mexico’s regulations, which are heavier due to NAFTA than other Latin American countries where they do business. Language is a barrier, and so is insecurity, per Chinese business people (Spanish.)

On the Mexican side, officials have failed to come up with the kind of long-term strategy and task force needed to guide China through those pitfalls, says Dussel Peters. That haphazard approach has left a trail of misunderstandings and failed deals, including a cancelled $4 billion bullet-train project in Central Mexico.

The risks of a Trump presidency might prove a powerful incentive to come up with new ways of working together—and quickly. Trump’s team has said NAFTA renegotiations start on day one. That’s less than two months from now.