Spain's Miguel Angel Lopez hauled in Wang Zhen to win the men's 20km race walk on Sunday and deny China their first gold medal of their home World Athletics Championships.
Wang, 23, bronze medallist at the London Olympics three years ago, broke clear of the leading pack at the 13km mark and opened up a sizeable lead that looked to be enough.
But a steely Lopez closed the gap at the 17km mark before overtaking an exhausted Wang shortly after, powering home to the Bird's Nest Stadium with the Chinese athlete unable to match the pace.
Lopez pumped his fist in delight as he crossed the line in a personal best time of one hour 19 minutes 14 seconds, with Wang 15 seconds back.
Ben Thorne of Canada was a distant third in 1.19:57.
Olympic champion Ding Chen had joined Wang in an early Chinese pace-setting group but had to settle for ninth.
World record holder Yusuke Suzuki of Japan quit just after halfway through in ever-increasing heat in the Chinese capital.

Ireland's Alex Wright was disqualified 50 minutes into the race for losing contact with the ground on three occasions.