US President Joe Biden and Mexican President Andres Manuel Lopez Obrador pledged Friday to work together to tackle the fentanyl and migration crises as an Asia-Pacific summit wrapped up in San Francisco.

"I couldn't have a better partner than you," Biden told Lopez Obrador on the sidelines of the Asia-Pacific Economic Cooperation (APEC) forum, which groups 21 economies from around the region.

Biden said that "I know it's not easy" to deal with migration along the US-Mexican border, a crucial issue for the Democrat as he seeks a second term in the 2024 US presidential election.

The Mexican leader vowed to tackle trafficking and production of the synthetic opioid fentanyl, which has caused tens of thousands of deaths in the United States, as an "act of solidarity".

He told Biden he was "fully aware of the damage it poses to the youth of the United States."

Lopez Obrador added that the US president is "a man with convictions, a good man."

The broader APEC summit wrapped up Friday with a joint communique full of pledges to work towards boosting renewable energy and improve trade, but without agreement on the two major issues roiling global politics -- Israel's war in Gaza and Russia's invasion of Ukraine.

Instead, an accompanying chair's statement noted the bloc -- which includes Russia -- had merely "exchanged views on the ongoing crisis in Gaza" and said "most members" condemned Moscow's attack on its neighbor.

"Some Leaders objected to the inclusion of this language in the accompanying 2023 APEC Leaders' Golden Gate Declaration on the basis that they do not believe that APEC is a forum to discuss geopolitical issues," the chair's statement said.

- China-US -


The highlight of the APEC summit week was Biden's historic meeting with Chinese President Xi Jinping to ease tensions, where they agreed to restore military-to-military communications and tackle the fentanyl trade.

Despite that, the leaders of the rival superpowers competed to win allies in the region, where Washington and Beijing have been offering economic and diplomatic sweeteners to get countries onside.

Biden said in a final speech to the summit that US was "unwavering" in its commitment to the region, before handing over the APEC chairmanship to Peru.

The Chinese and US leaders both courted Mexico's Lopez Obrador, who was making a rare international visit, in a sign of the country's key strategic importance.

- 'Close cooperation' -


Biden and Lopez Obrador agreed during the summit to "sustain and expand the close cooperation that we have achieved in managing migration in the Western Hemisphere", according to a White House readout.

Illegal immigration has become a major political headache for Democrat Biden, whose likely Republican opponent next year, the hard-right populist Donald Trump, bases much of his campaign around tightening border policies.

The United States has documented record numbers of crossings along the countries' shared 1,900-mile (3,100-kilometer) border, thanks partly to a high number of Venezuelans fleeing the situation under President Nicolas Maduro.

Biden has been taking a tougher stance recently, requesting $14 billion in border funds from Congress in October as part of a huge national security package that also includes military aid for Israel and Ukraine.

His administration has also announced plans to extend the border wall with Mexico, a policy that was introduced by Trump and which Biden had previously said he would never follow.

The Chinese president's bid to boost ties with Mexico during the two leaders' first meeting revolved meanwhile around the economy.

Chinese state media said during his meeting with Lopez Obrador on Thursday, Xi had called for Mexico and China to expand cooperation on sectors including electric vehicles -- which are themselves a key focus for Biden.

The Mexican president also addressed the fentanyl issue when he met Xi.

Lopez Obrador "emphasized the importance of reaching an agreement to exchange information on shipments leaving Asia," his foreign ministry said in a statement.

Washington has alleged that the precursor chemicals are also made by Mexican drug cartels, but Lopez Obrador's administration has previously said the ingredients come from Asia.