BEIJING — China’s leader, Xi Jinping, arrived in North Korea’s capital on Thursday to a 21-gun salute at the airport, the release of thousands of balloons and crowds lining the streets, as his car wound its way to the mausoleum where the North’s founder lies.

The elaborate ceremonial welcome for Mr. Xi, making his first visit to the North since taking power seven years ago, seemed designed as an upbeat makeover of what has been a dour relationship between him and the North’s young leader, Kim Jong-un.

The two are engaged in separate disputes with President Trump — one over trade, the other over the North’s nuclear weapons. American officials have said they expect Mr. Xi to try to make headway with Mr. Kim on the nuclear issue, then use that as leverage with Mr. Trump on trade next week, when the two are expected to meet in Japan.

[Here’s what to watch for as Mr. Xi visits North Korea.]

Such expectations grew on Wednesday when a rare article by Mr. Xi appeared in the North Korean ruling party’s official newspaper, Rodong Sinmun. He wrote that China was willing to draw up a “grand plan” with the North that would “realize permanent peace” on the Korean Peninsula.