Ryuichi Kiyonari and Shane Byrne took the race victories in a dramatic eighth round of the Bennetts British Superbike Championship at Knockhill.
Japanese rider Kiyonari took the opening race victory on the HM Plant Honda, moving ahead of Leon Haslam's Airwaves Ducati with five laps remaining.
Byrne grabbed second place on the Rizla Suzuki when Haslam ran wide at the hairpin.
Byrne was always in command in the second 30-lap race at the Fife circuit to take his first victory since returning from two years in MotoGP and give the Rizla Suzuki team their first success in almost two seasons.
Pole position rider Jonathan Rea, on the Red Bull Honda. took second place in race two for his best result, with Haslam again third.
Haslam now trails his Spanish team-mate Gregorio Lavilla, who has 244 points, by 11 points in the championship standings.
Lavilla, who struggled to 11th place in the opener after an early machine problem, crashed out of race two.
Kiyonari was sidelined by a machine problem midway through the second race.
Rea had rewritten the Knockhill record books on Saturday with a scorching lap to take pole.
The 19-year-old Red Bull Honda rider set a lap average speed of 94.72mph lap to head off the challenge of former champion Byrne.
The Ballyclare rider had been on the pace throughout practice, increasing his speed when it mattered most in the session to decide the start grid.
Rea set a best time of 48.317 seconds, a time that was a second faster than last year's pole time and 1.3secs inside the record. Rea was thrilled with his Saturday show, especially as the second British Superbike Championship pole of his career came at the same circuit where two years earlier he had sustained serious leg injuries in a high-speed crash.
He said: "I nearly ended my career here, so it was really good to claim this pole start here."