China went into the high bar - the last rotation for both China and Russia - with a 1.394-point lead but Sun Wei's fall allowed Russia to snatch the initiative on Wednesday.
Strong high bar routines from Ivan Stretovich, Artur Dalaloyan and Nikita Nagornyy lifted Russia to a total score of 261.726. That was 0.997 ahead of China, which had won the men's team event at seven of the last eight world championships.
Nagornyy went last and sealed the win when he stuck his dismount. He said he shrugged off the pressure.
"I enjoyed the moment because these sensations and impressions that you feel before going out there, the responsibility, that's something you can never find in life," he said. "Only sports can give you emotions like that."
It was the first time Russia had won this title since the Soviet Union's victory in 1991, although it won the Olympic gold medal in the same event in 1996. Another ex-Soviet nation, Belarus, took the world title in 2001.
Russia's win came a year after losing out on the gold to China by 0.049 points.
"For a whole year I couldn't sleep soundly because I didn't have that medal. A year ago we let it go with our errors when we were competing with the Chinese," Dalaloyan said.
Amid Russia's celebrations, Dalaloyan walked over to the Chinese team and embraced each athlete including Sun, who was weeping and covered his face with a jacket.
"I did that out of respect for the Chinese team because I saw some people had tears in their eyes and started to remember myself a year ago," he said. "I saw the frustration on the guys' faces and decided to support them because we're all friends, all people. I know what it's like to be second, so out of humanity I went over to support the guys."
Japan took the bronze, continuing its run of reaching the men's team podium at every world championships since 2003. It was the first year since 1991 that the same three teams made the podium two years running.
More AP sports: https://apnews.com/apf-sports and https://twitter.com/AP_Sports
Copyright 2019 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.