IT was arguably the most fiercely contested battle in years, but after a nail-biting thriller that came down to the wire, it was Daniel Purvis who emerged triumphant to claim victory at the Scottish National Gymnastics Championships in Perth.

Daniel Keatings had to settle for silver in the men's senior all-around competition with Frank Baines claiming bronze at the Bell's Sports Centre. The afternoon was not without drama as Keatings (Huntingdon) took a spectacular fall from pommel horse - the apparatus on which he is the reigning European champion - and Purvis (Southport YMCA), a three-time British senior champion, made a series of uncharacteristic errors on floor.

Baines (Southport YMCA), in his first return to competition following a potentially career- ending injury last August which saw him break four vertebrae in his neck and back, was an early leader after a blistering opener on floor. But by the halfway mark Keatings had clawed his way to the top of the standings with Purvis sitting in third. Baines saw his chances of contesting the overall lead fall away on parallel bars, his penultimate piece of apparatus, with a strong performance by Purvis allowing him to leap frog Keatings into first place and tee up an edge-of- the seat final rotation.

High bar is traditionally Purvis's weakest piece of apparatus, but he debuted an ambitious routine and this, coupled with misfortune for Keatings, who suffered a hand guard malfunction, was enough to seal the final allocation of medals.

In the end, Purvis took the win by almost two marks with an overall score of 87.167 while the slimmest of margins of 0.001 separated Keatings and Baines in second and third.

"Myself, Dan and Frank all train together at [British Gymnastics HQ] at Lilleshall so we knew it was going to be close," said Purvis. "To be honest, I thought I was out of it after floor so my goal was just to do as well as I could on the other pieces. I'm pleased with how things went."

He may not have claimed gold, but Keatings was buoyed by his performance. "This was my first all-around competition for two years so I wasn't bothered where I finished up, I'm just glad to have survived it," he said. "Today was a big stepping stone towards the Commonwealth Games because I want to do all-around there.

"I finished second and was right in the mix going into the last piece. My hand guard ripped on high bar. I caught my first release and heard it go. I looked at it and saw it was torn. It was slippy as well so after that I was basically holding on for my life as I finished the routine. The main thing is I came away from it without any injury."

Purvis and Keatings said they were encouraged by the high standard of performances within the Scottish senior men's field. "It's fantastic to see that depth because it pushes all of us on," said Keatings. "If there were only a couple of good people it would be plain sailing into the team for the Games, but with so many people fighting for their spot it makes everyone stronger."

Purvis gained the Games qualification standard on five apparatus as did Keatings, with Baines, the 2012 junior European all-around champion, meeting it on four.

Daniel Iley (Exeter), in his first year competing as a senior, finished fourth in the men's all-around posting 81.101 - a score above the required Glasgow 2014 qualification standard of 80.500 -with strong performances on rings, vault and high bar.

But it was a bad day for reigning Scottish all-around title Adam Cox (City of Glasgow) who, following a shaky start on pommel horse, slipped during his parallel bars routine, badly jarring his left shoulder. He retired from competition as a precaution.

"I'm disappointed as training has been going so well in recent weeks, but it wasn't worth risking further damage," he said.

The Sunday Herald columnist will now aim to be back in action for the English Championships on March 14 at which he has a guest spot.

In the women's event, with Amy Regan (City of Glasgow), winner of the all-around title for the past four years, absent through injury the competition was thrown wide open. Emma White (City of Birmingham) was the new favourite going into the competition and she didn't disappoint, seeing off the challenge of Carly Smith (City of Glasgow) who took silver and Beth McKellar (West Lothian) who finished in bronze.

The silver medallist last year, it marks something of a fairytale result for White, 23, who only returned to competitive action a little over 12 months ago. The Dunfermline-born gymnast competed at the 2006 Commonwealth Games in Melbourne, but her dreams ended in heartbreak in Delhi four years later after a knee injury forced her to head home for surgery before competition even began.

"I'm really happy," said White, who previously won the all-around title in 2007 and 2008. "This is my last Scottish Championships as I plan to retire after Glasgow 2014 so it will be nice to have the trophy for the next year."

Stephen Tonge (West Lothian) is the men's junior champion while David Weir (City of Glasgow), Joshua Lincoln (Bury) and Euan McLellan (West Lothian) took victory in their respective youth, intermediate and boys categories.

Izzy Tolometti (Garioch) won the women's junior title while Louise McColgan (Largs) claimed gold in the espoir category for the second year running.

The individual apparatus finals will be contested today.