Hellen Obiri ran the race of her life to claim consolation for her Olympic silver a year ago, clinching the women's 5,000m World title in 14:34.86 on Sunday.
Ethiopia's Ayana, who led Obiri for more than half the race, was denied a double after winning the 10,000 metres with a devastating run earlier at the championships.
Ayana led with Obiri on her shoulder into the final lap until the Kenyan, silver medallist in Rio de Janeiro a year ago, burst past with 300 metres left and stormed home to win in 14:34.86, more than five seconds clear of her rival.
"I was telling myself to go", she said. "I could see Ayana was not going so I thought, why not?"
Ayana was being chased down by the fast-finishing Sifan Hassan on the last lap but the Ethiopian had enough of a buffer to hang onto silver medal position in 14:40.36. "I am mentally strong so I knew I was capable", said Obiri.
It was always going to be an enthralling contest. These lap times represented world record pace for the distance but Obiri was more than content - and confident enough - to sit in her slipstream while the field splintered behind the leaders.
After a season blighted by a leg injury and illness, Ayana looked back at her imperious best in the 10,000m but it soon became clear these exertions were catching up with the reigning champion.
Ayana said that she had paid for her astonishing victory in the 10,000m and had run through the pain barrier.
There was a cagey start with the first 400 metres taking a painfully slow 81 seconds before Ayana and Obiri took control.
Ayana had chose to inject some much-needed zip into the pace with nine laps to run and only Obiri was able to match her.
"It was a hard race. It was hard to push Hellen through to the finish line", said Ayana. "Compared to Rio this is a bigger achievement".