Andrew Turnbull's double helped Scotland claim the Sevens Plate
Scotland have won the Plate final following a 21-17 win over Australia at the Rugby World Cup Sevens in Dubai.
An Andrew Turnbull double and a Roddy Grant try put Scotland 21-12 ahead, with Australia's brothers Ed and Jono Jenkins scoring a try each.
Damon Murphy's try late reduced the margin but the Scots won through.
Earlier Scotland sailed to a comfortable 29-7 win over Portugal having earlier edged France 21-19 in a tense encounter.
The Scots were knocked out of the Cup competition, following pool defeats to South Africa and Canada, while they managed to beat Japan.
After the final, Scotland coach Stephen Gemmell said: "Credit to the boys, they played well today.
"We came into what was pretty much a new tournament today, which we wanted to win and we've done that.
"Bar five minutes against Canada on Thursday we showed we can compete against the best and there's no reason why we cannot sit at the top table with some of these bigger teams.
"I'm not saying ninth is where we want to be, but we had to come out and front up after the disappointment of the first game and the boys have done that.
"This is a proud moment for me and hopefully a proud moment for everyone else in Scotland and Scottish Rugby."
Scott Forrest, Roland Reid and Roddy Grant were the try-scorers in the match against the French, while skipper Gregor converted all three scores.
The damage was done in the opening day shock defeat to Canada, when the Scots were caught cold and trailed 33-0 at half-time, before clawing back two tries.
A 31-10 win over Japan followed and a much-improved tussle with South Africa ended in extra-time heartache, with Springboks captain Mpho Mbiyozo touching down shortly after the full-time hooter to seal a 19-14 victory.
Scotland 7s squad:
Colin Gregor (Glasgow Warriors) (capt), Mike Adamson (Glasgow Warriors), Rob Dewey (Ulster), Andrew Easson (Edinburgh), Scott Forrest (Ayr), Roddy Grant (West of Scotland), Rory Hutton (Hawick), Roland Reid (Edinburgh), Scott Riddell (Blaydon), Colin Shaw (Glasgow Warriors), James Thompson (Edinburgh), Andrew Turnbull (Edinburgh)