BEIJING - A top North Korean envoy delivered a letter from leader Kim Jong Un to Chinese President Xi Jinping on Friday and told him Pyongyang would take steps to rejoin stalled nuclear disarmament talks, in an apparent victory for Beijing's efforts to coax its unruly ally into lowering tensions.

North Korean Vice Marshal Choe Ryong Hae's three-day visit was seen as a fence-mending mission after Pyongyang angered Beijing with recent snubs and moves to develop its nuclear program. Choe returned to North Korea late Friday.

The official China News Service said Choe delivered the handwritten letter from Kim to Xi at an afternoon meeting at the Great Hall of the People in Beijing. It gave no details about the letter's contents.

North Korea is willing to work with all sides to "appropriately resolve the relevant questions through the six-party talks and other forms," Choe was quoted as saying by Chinese state broadcaster CCTV. He said Pyongyang was "willing to take active measures in this regard."

The six parties are the Koreas, the United States, Japan, China, and Russia. Choe offered no details on how North Korea planned to resume talks. North Korea walked away from the six-party nuclear disarmament talks in 2009 over disagreements on how to verify steps the North was meant to take to end its nuclear programs.

Since its third nuclear test, in February, North Korea has said that any diplomatic talks would have to recognize it as a nuclear power. That puts Pyongyang at loggerheads with Washington, which demands that talks be based on commitments by the North to abandon its nuclear programs.

Still, Choe's remarks seem to indicate an easing of tensions. John Delury, a Yonsei University professor who specializes in China and North Korea, said, "This trip is moving things back to a regular strategic dialogue."

China has been under intense pressure from Washington to push North Korea into lowering tensions and resuming dialogue.

Xi reaffirmed longstanding ties between the communist neighbors, and urged all sides to "keep cool and exercise restraint."

The six-party talks, which include the Koreas, the U.S., Japan, China and Russia, should aim to end North Korea's nuclear programs and "maintain lasting peace and stability on the peninsula and in northeast Asia," Xi was quoted as saying.