BEIJING — China’s president, Xi Jinping, has urged President Trump to show restraint toward North Korea despite signs that the North may be preparing a nuclear test. Mr. Xi made the appeal in a phone call with Mr. Trump on Monday that reflected growing alarm over North Korea’s plans, which could tip the region into crisis.

The phone conversation came after Mr. Trump had already used a meeting with Mr. Xi in Florida, a follow-up phone call, interviews and Twitter messages to press Mr. Xi to do more to deter North Korea from holding additional nuclear and missile tests. The United States and its allies have been on alert for another atomic test by the North.

In the latest call, the third between the two leaders, Mr. Xi indicated to Mr. Trump that China opposed any such test by North Korea, but he also nudged Mr. Trump to avoid a tit-for-tat response to the North’s fiery threats, according to a report on Chinese television.

“China adamantly opposes any actions in contravention of the United Nations Security Council resolutions,” Mr. Xi said, according to the report, evidently referring to a series of decisions by the Council to punish North Korea for its nuclear and missile programs.