Scottish athletes have had their most successful Olympic games ever with a total of 13 medals won across eight sports.

The games, which were brought to a triumphant end on Sunday, saw athletes from across the country secure four gold medals, seven silver medals and two bronze medals, making the event the most successful overseas Olympics ever for Scottish athletes.

Among the winners were four Glasgow-born competitors - Katherine Grainger, Callum Skinner, Katie Archibald and Duncan Scott.

Sportscotland’s director of high performance, Mike Whittingham, described the success as a “testament to the strength of the system here in Scotland”.

Read more: Rio hands over to Tokyo as Team GB celebrates golden Games

Mountain biker Grant Ferguson was the last Scot to participate in the Olympic games Rio 2016, placing 17th in the cross-country event, while runners Derek and Callum Hawkins and Tsegai Tewelde put on a valiant display at the men’s marathon earlier in the day.

24-year-old Callum performed best leading the race at the midway point before falling back to ninth, in a time of 2:11.52, just three minutes behind the Kenyan winner Eliud Kipchoge. Callum’s brother Derek placed 114th and Tsegai Tewelde pulled out an hour into the race after suffering from a foot injury.

Following the final events, First Minister Nicola Sturgeon paid tribute to the hard work and dedication of all the athletes who competed in saying: “There is no higher honour than competing on a global stage and all our sportsmen and women have done Scotland proud as part of Team GB.

“This has been a fantastic games and the team have been brilliant from start to finish.

“Their performances will have inspired the next generation of young talent coming through the ranks and I’m sure the entire team will all be given a warm and rapturous Scottish welcome when they return home this week.”

Success for Scotland was felt across a multitude of sporting disciplines.

On the track, Eilidh Doyle, from Peebles, took bronze at the 4x400m relay while 19 year-old Duncan Scott, from Stirling, became the first Scottish athlete to win multiple medals in swimming after he and his Team GB colleagues, including Stephen Milne from Perth, won silver in the 4x100m Medley Relay. Scott also went on to claim the silver medal in the 4x200m Freestyle Relay.

Read more: Rio hands over to Tokyo as Team GB celebrates golden Games

Rowers Heather Stanning, from Lossiemouth, Katherine Grainger from Glasgow and Polly Swann and Karen Bennett, both from Edinburgh, will be bringing home gold and silver respectively.

Bearsden-born Grainger became the most decorated female Olympian after securing a silver medal, alongside her partner Victoria Thornley, in thw women’s double sculls while British Army major Stanning defended her London 2012 rowing title.

Swann and Bennett helped Britain win a first Olympic medal in the women's eight.

Aberdonian David Florence, 34, and partner Richard Hounslow won silver for the second successive Games in the canoe double.

Following in the footsteps of Sir Chris Hoy, 24-year-old Callum Skinner raced to become the first Scot to win gold at Rio after winning the men’s team sprint alongside team mates Philip Hindes and Jason Kenny.

Fellow cyclist Katie Archibald, from Milngavie, will be bringing home another gold for Glasgow having won in the women’s team pursuit.

Mark Bennett, from Ayrshire and team mate Mark Robertson, from Melrose, both played key roles in the Team GB rugby sevens squad, helping them secure a silver medal while sporting icon Andy Murray added another gold medal to the tally after defeating his Argentinian opponent in a four hour long game.

Scotland’s second bronze was won by Sally Conway in the women’s judo. Conway beat world champion Gevrise Emane.

sportscotland Chief Executive Stewart Harris said: “It has been a remarkable performance from the Scots to win 12 medals and have 15 medallists. This represents the most successful overseas Games for Scots on Team GB and everyone in Scotland can be very proud of their success.

“It’s testament to all the hard work by the athletes, sports, coaches and the collaboration between UK Sport and the sportscotland institute of sport that Scottish athletes are delivering record-breaking performances on the Olympic stage.”

Coming home celebrations for Scotland’s Olympians, Paralympians and support staff at the Games will take place in Oriam, Scotland’s new national performance centre based at Heriot-Watt University, Edinburgh, on Wednesday, 28th September.