Razgatlioglu looked to have the earlier 12-lap superpole race under control as he held a comfortable lead at halfway but was reeled in Bulega who then produced a stunning final corner to snatch victory by 0.003 seconds.
Rea produced a fast start to move up to second place on lap one of the superpole race but slid off on lap five after he had dropped down the field before remounting to eventually finish 22nd.
The Northern Ireland man, in his first season at Yamaha after his long successful stint at Kawasaki, was fifth in Saturday’s race one on the tight Portuguese circuit, with his sole podium this year coming when taking third in the superpole race in the British round.
The previous closest race finish in World Superbikes history came at Phillip Island in Australia in 2010 when Leon Haslam edged out Michel Fabrizio by 0.004 seconds.
Bautista moved up the field to complete the superpole podium positions with Andrea Locatelli, Danilo Petrucci and Great Britain’s Alex Lowes filling out the top six positions.
Razgatlioglu took victory in race one ahead of Bulega when third-placed Iker Lecuona gave Honda their first podium finish of 2024.
The Turkish rider’s title lead is even more impressive given that he missed last month’s two rounds in France and Italy after suffering a collapsed lung in a practice crash at Magny-Cours.