His first failure came at 2.28m, allowing arch-rival Bogdan Bondarenko to steal an early march in the competition. The Ukrainian world champion enjoyed first-time clearances at 2.28m, 2.34m and 2.37m.
Barshim, meanwhile, knocked the bar off again at 2.37m and a victory – not only in the Belgian capital but also in the Diamond Race – was looking less and less likely.
But as the conditions became more humid, Barshim began to feel more and more at home. He sailed over 2.40m at the first time of asking, as did Bondarenko.
The deciding moment came with the bar at 2.43m. Barshim, the world indoor champion, sailed over with a beautiful clearance. Not only was it a world-leading mark, but it also broke his own Asian record as well as the IAAF Diamond League record.
For the first time in the competition, Bondarenko was under pressure.
He knocked the bar down on his first try and then both jumpers agreed to move the bar to a world record height of 2.46m. Both jumpers had solid attempts at that height, but none of them were particularly close. Olympic champion Ivan Ukhov finished third with 2.34m.
It meant that for the third time this year, Bondarenko had to settle for second place behind Barshim. It brought their head-to-head record – for both this season and their careers as a whole – level, at three wins each for 2014 and seven wins each for their entire careers.
Including indoor marks, today’s competition brought the tally of 2.40m jumps in 2014 to 16. Before this year, never had two high jumpers cleared 2.40m in the same competition. It has now happened four times.
Before today, Barshim was tied with Bondarenko and Sweden’s Patrik Sjoberg as the second-best outdoor performer in history. Now the 23-year-old stands alone in that position on the all-time list, with just world record-holder Javier Sotomayor ahead of him.
"In a competition like today, you don't have the world record on your mind," said Barshim. "You just want to win, you want to beat your opponent; you don't mention what the height is.
"Now I'm the prince of the high jump and I'm on the right way to becoming the king," he added. "I just need more experience and a crowd like today to beat Sotomayor's world record."
Barshim’s winning leap was one of seven world-leading marks in Brussels; an incredible feat, given it is late in the season in a year with so many championships on the calendar.
One of the other world-leading marks came in the men’s pole vault with Renaud Lavillenie making a little bit of history.
The Olympic champion got over his opening height of 5.65m at the second time of asking, then took the lead with a first-time clearance at 5.83m; a height no other vaulter managed.
The world record-holder then moved the bar to 5.93m, getting over it on his second attempt to set a world-leading mark. He then attempted 6.03m, but it was not to be.
Regardless, the Frenchman had already made history by becoming the only athlete in history to win the Diamond Race five times in succession. Ever since the IAAF Diamond League began in 2010, no other athlete has won the Diamond Race in the men’s pole vault.
Poland’s Robert Sobera was a distant second with 5.65m, tied with world indoor champion Konstantinos Filippidis of Greece.
Jon Mulkeen for the IAAF Diamond League