Barshim – giving Qatar their first Olympic track and field title – and Tamberi recorded a better clearance of 2.37 meters on Sunday.
Maksim Nedasekau of Belarus also climbed this height to set a national record. However, he missed a share of the gold due to a previous failure.
Barshim, 30, and Tamberi, 29, didn’t miss their attempt until they tried to cross the 2.39-meter mark.
After three failures each at 2.39, they found themselves tied and struck up a conversation with an Olympic official, who first offered them a “kick-off” to settle the matter.
“Can we have two gold medals,” Barshim asked him.
The official nodded, and the two athletes put their hands together and shouted with joy.
For Barshim, he completes a house full of Olympic medals after winning bronze in London in 2012 and silver in Rio five years ago.
Barshim missed much of 2018 with a serious ankle injury, rebounding to win world away home gold in 2019.
“It’s a dream I don’t want to wake up from,” he said.
“I have been through a lot. I have been waiting for five years, with injuries and a lot of setbacks.
“But we are here today to share this moment and all the sacrifices. It is totally worth it now right now.
Tamberi added Olympic gold to a world indoor title and a European title, both in 2016, and celebrated with exuberance despite the absence of spectators at games affected by the pandemic.
The long haired sweater collapsed to the floor and rolled in ecstasy.
He briefly regained his composure before launching into new stories when compatriot Lamont Marcell Jacobs stunned the sprinting world by winning the Olympic 100-meter title.
His emotional celebrations were understandable given he had suffered a serious Achilles tendon injury weeks away from the 2016 Games, which saw him perform in a plaster cast.
“After my injuries I just wanted to come back, but now I have this gold medal, it’s amazing,” he said.
“I dreamed about it so many times. I was told in 2016, just before Rio, that there was a risk that I could no longer compete. It has been a long journey, ”he added.