Katie Shanahan won her second gold medal of the week but Duncan Scott had to settle for silver once again on the penultimate day of the British Championships in Sheffield.

In the 200m individual medley final, Shanahan produced a world-class performance to win gold in one of the closest finals of the meet.

The 18-year-old from Glasgow was up against the Commonwealth Games bronze medallist and race favourite, Abbie Wood from England, but Shanahan, who has already won gold and silver this week, showed no signs of being intimidated by her more experienced competitor.

The lead changed hands several times but despite Wood being narrowly ahead with 50m to go, the Scot overhauled the Englishwoman to win by just six hundredths of a second in 2 minutes 9.40 seconds, remarkably slicing over two seconds off her personal best and breaking Hannah Miley’s Scottish record that has stood for nearly 14 years.

It was double delight for Shanahan as, with these British Championships doubling as the trials for the World Championships in Japan in July, she went under the qualifying time for the GB team, guaranteeing selection and ensuring she will make her World Championship debut this summer.

“That’s my stand-out race of this week,” said Shanahan. “Hannah [Miley] was the leading lady in British swimming in the IM for years so to be following in her footsteps and breaking her records is so special.

“Hopefully I can continue that and get the record down further in the summer.

“I’m so excited to go to Japan, to race the best girls in the world and to see how I measure up against them.”

In the men’s event, Scott finished second in what was another incredibly close finish.

Scotland’s most-decorated swimmer, and the Olympic silver medallist in this event, was up against one of his great rivals, Englishman Tom Dean, and as they have done so many times in recent years, the pair produced yet another thriller.

Dean took the early lead but Scott nudged ahead and with 50m to go, was still in front. The 25-year-old could not hold on over the freestyle leg, however, with Dean winning gold in 1 minute 56.65 seconds and Scott just seven hundredths behind.

There was some consolation for the University of Stirling swimmer, however, in that he dipped under the consideration time for the GB squad for the World Championships.

There was also an impressive performance from Mark Szaranek who took bronze in 2 minutes 0.59 seconds. Fellow Scots George Smith, Evan Jones and Charlie Hutchison were fourth, fifth and eighth respectively.

Olympic relay gold medallist Kathleen Dawson narrowly missed out on the podium in the 50m backstroke, finishing fourth in 28.34 seconds, just two hundredths behind third place.

On the final day of the meet, one of the most hotly-anticipated races of the week takes place. In the 200m freestyle, Scott will once again take on Dean in a repeat of the Olympic final in Tokyo in which Dean pipped Scott to gold. Scott will be looking for revenge for yesterday’s defeat and both will be looking to go inside the World Championships qualification time of 1 minute 45.01 seconds.

Also in action is Kara Hanlon, who aims to make it a hat-trick of medals when she goes in the 100m breaststroke, while in the 100m butterfly, Keanna McInnes is also hopeful of making the podium.