President Joe Biden walks across the South Lawn of the White House in Washington, Tuesday, Nov. 14, 2023, to board Marine One as he heads to San Francisco for Asia-Pacific Economic Cooperation (APEC) summit. (AP Photo/Susan Walsh)

WOODSIDE, Calif. (AP) — President Joe Biden says he and Chinese President Xi Jinping agreed to work together to better combat illegal fentanyl as well as reestablish military communications and tackle risks associated with artificial intelligence.

Biden met for more than four hours with Xi on the sidelines of the Asia-Pacific Economic Cooperative conference Wednesday and talked at a news conference afterward about modest but potentially important agreements reached by both sides.

He described how lethal fentanyl has been in the United States and said broken communications systems are “how accidents happen.”

But he also conceded Xi was a dictator and said he believed in trusting but verifying what the Chinese leader said.