Vice President Pence was not planning to meet with the leaders of Russia or China during his Asia trip last week, but they sought him out anyway. In several conversations with Vladimir Putin, Xi Jinping and Chinese Premier Li Keqiang, Pence delivered messages on election interference, North Korea and the trade dispute, and also set the stage for big showdowns next week when President Trump meets the same leaders in Argentina.

Pence stood in for Trump at the Association of Southeast Asian Nations (ASEAN) summit in Singapore and the Asia-Pacific Economic Cooperation (APEC) leaders meeting in Papua New Guinea. The trip was billed as a reassurance tour wherein the vice president would reinforce with allies the Indo-Pacific strategy Trump announced at these events last year. The meetings with Russian and Chinese leaders were impromptu encounters but had real substance.

Pence and Putin had three short conversations in Singapore. First, they exchanged pleasantries at the ASEAN gala dinner. (Putin arrived late.) The following day, before the plenary, Putin tapped Pence on the shoulder as he walked to his seat. The press, still in the room, caught Pence looking sternly at Putin for the minute or so they talked. Putin offered Russian help to fight the California wildfires. Pence confirmed to Putin that Trump would meet him at the upcoming Group of 20 meeting in Argentina.

When the plenary ended, the two men huddled in the corner for about 15 minutes as staff, security and translators swarmed around them. Pence decided to confront Putin about Russia’s interference in U.S. democracy.

“So I looked at him and I said, ‘We know what happened in 2016,’ ” Pence told me in an interview. “And I said, ‘As the president has told you, we’re not having it.’ ”

Putin denied that Russia had done anything wrong, but Pence stuck to his guns.

“And I said, ‘Mr. President, I’m very aware of what you’ve said about that, but I’m telling you we’re not having it,’ ” Pence said. “I wanted to reiterate what the president has said. I thought it was important he hear that from the vice president, too.”

Pence then told Putin it was extremely important that Russia enforce U.N. sanctions on Pyongyang in the crucial period before the next U.S.-North Korea summit. Putin raised several issues he wants to discuss with Trump in Argentina, including Syria and the Intermediate-range Nuclear Forces Treaty, which Trump has said the United States is withdrawing from.

Later that day, Chinese Premier Li caught Pence while the two were walking off stage after taking the ASEAN “family photo.” Li wanted to talk about the ongoing U.S.-China trade war.

Li told Pence to remember that China is a “developing nation,” meaning it should get special treatment on trade. “And we got down to the corner, and we just stopped for a minute, and I just looked at him and said, ‘Things have got to change,’ ” Pence told me.

Li was taken aback, with a look of surprise on his face. Pence then delivered the same message he had told me at the start of the trip: that the G-20 was China’s best (if not last) chance to come to the table with a real offer to end its unfair trade and industrial practices.

“You should encourage President Xi to take full advantage of the opportunity in Argentina,” Pence said he told Li.

Pence delivered a similar message directly to Xi on Saturday night in Papua New Guinea, when the two leaders were seated near each other at the APEC gala. “I said, ‘The president asked me to tell you he hopes you can have a conversation about opening markets,’ ” Pence told me.

Pence walked a fine line when dealing with the leaders of Russia and China. He had to deliver tough messages clearly, keep the door open for dialogue and progress, and not show any daylight between himself and his boss. Throughout the trip, whenever Trump spoke about China, Pence’s staff quickly incorporated those remarks into Pence’s speeches.

“Pence did what President Donald Trump rarely does: stay on message, calm nervous security partners and clearly lay out a vision for American foreign policy,” wrote Bloomberg’s Toluse Olorunnipa. “While Asian leaders listened closely to Pence, many were waiting to see if Trump would do something to contradict him.”

Everybody talking to Pence understood that he represented only what Trump’s position was that day and that Trump could change his mind the following day for any reason. There’s a level of Trump’s unpredictability that even Pence’s Spartan-like discipline can never overcome.

But don’t believe reports that world leaders were upset Trump wasn’t there. They were fine dealing with Pence, and Pence was in his element. Trump sees the boring work of diplomacy as a nuisance. Perhaps sending Pence in his place is a win-win arrangement for both of them — and the country as well.

We are a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for us to earn fees by linking to Amazon.com and affiliated sites.

Josh RoginJosh Rogin is a columnist for the Global Opinions section of The Washington Post. He writes about foreign policy and national security. Rogin is also a political analyst for CNN. He previously worked for Bloomberg View, the Daily Beast, Foreign Policy, Congressional Quarterly, Federal Computer Week and Japan's Asahi Shimbun newspaper. Follow