Joao Costa, the grand old master of Portugal, was foiled by an in-form Serb in the final shots of his bid for 10m air pistol glory on Wednesday.
Instead, Damir Mikec made it three golds from four events on the indoor ranges at Baku 2015.
Costa, 50, had the gold in his grasp as he pulled back a 4.1-point deficit on leader Juraj Tuzinsky in four shots, leaving the Slovakian in the bronze medal position.
But Costa, a double world cup winner in Munich last month, held only a 0.1-point advantage over Mikec going into the final two shots and scored 10.4 and 10.0 to the Serbian's 10.7 and 10.1.
The triumph for Mikec, who has four gold and three silver world cup medals to his name, made it a 10m air pistol double for Serbia after Zorana Arunovic claimed the women's title on Wednesday. Compatriot Andrea Arsovic took the women's 10m air rifle on Tuesday.
"The final was incredible," said Mikec. "I was very bad in the beginning. I shot an 8.0 and after I said to myself, 'just relax and give your best' and then I started to shoot like I know I can."
Fifth-placed Ukanian Pavlo Korostylov, 17, who struck gold at the Nanjing 2014 Youth Olympic Games, won a place at the Rio 2016 Olympic Games for his National Olympic Committee.