Click here for full BSB qualifying results from Knockhill
Shane Byrne has held on to pole position by just 0.001s to deny Jason O'Halloran a maiden MCE British Superbike pole in a qualifying session temporarily suspended by a heavy rain shower.
Qualifying was suspended for an hour after a heavy rain shower between Q1 and Q2 made conditions unsafe to run until the standing water was cleared off the Scottish circuit.
As a result, the times failed to better the Q1 best laps and the session became a challenge of who could find the most grip and confidence on the slippery surface.
When the action resumed Byrne and Be Wiser Ducati looked by far the more promising package in the wet by topping the intermediate session from team-mate Glenn Irwin and Honda's O'Halloran.
In the pole shootout the four-time BSB champion immediately stormed on to provisional pole but the times continued to be chipped away as the track slowly dried.
With a 51.374s Byrne looked comfortable until O'Halloran closed right up but missed out on matching the Londoner by one-thousandth of a second.
Leon Haslam headed the best of the rest to complete the front row narrowly ahead of JG Speedfit Kawasaki team-mate Peter Hickman while Irwin completely an impressive qualifying performance to take fifth on the grid.
Despite the turn in conditions John Hopkins kept his battle at the front on the ePayMe Yamaha in sixth and ahead of the third row trio of Dan Linfoot, Richard Cooper and Danny Buchan.
The unlucky losers who missed out on the pole shootout were James Ellison in 10th and Michael Laverty in 11th with FP1's fastest rider Luke Mossey completing the fourth row.