Yelena Soboleva led from the beginning of the 1500m final and the fastest woman in the world this year appeared confident enough to win her first championship medal.
But the Russian, a fourth place two years ago in Helsinki, didn't take into account the ambitions of Maryam Jamal who was cruelly robbed of victory two years ago when obstructed.
Jamal, born in Ethiopia and now running for Bahrain, staying free from trouble tonight, waited until 150m from home before powering ahead of the world indoor 1500m record holder.
For a minute it appeared Soboleva might pull her back in the finishing straight, but Jamal kept her concentration to hold off the late threat.
She lengthened her stride to win by 0.24sec in 3min 58.75sec with Ukraine's Iryna Lishchynska third in 4min 00.69sec.
"This makes up for Helsinki when I was in good shape but I was pushed," said 22-year-old Jamal.
"I am certain that if that hadn't happened, even if I didn't win, I would have medalled then. This gives me great confidence for the Olympics."