Auckland mechanical engineering student David Bishop emulated the feats of his gymnastics coach by winning a surprise bronze medal in the men's floor at the Commonwealth Games today.

The 24-year-old, who qualified seventh of eight starters for the floor final, edged Scotland's Daniel Keatings by just 0.017 points to become New Zealand's first gymnastics medallist since his coach, David Phillips, who also won bronze on the floor at the 1998 Games in Kuala Lumpur.

"It's incredible. It's been my ultimate goal and for it to happen is surreal really, I'm still waiting for it to settle in," Bishop said.

"My mouth dropped when I found out I had a medal."

Bishop was first-up and scored a solid 14.550 for his uncomplicated routine, an improvement on his qualifying score of 14.366, and then watched as England's Max Whitlock, the all-around champion, sailed past him with a polished routine that scored 15.533.

The final two competitors both qualified with scores just under the 15-mark but Keatings, who claimed silver in the all-around final yesterday, slipped up when his foot went out of bounds and the subsequent penalty ultimately cost him a medal, with the judges handing out 15.533.

That meant Bishop was guaranteed a medal in Glasgow, which would be bronze after Canada's Scott Morgan, competing last, scored 15.133 to secure second.

"Things went my way today and I'm incredibly proud to represent New Zealand do well here," floor specialist Bishop said.

"When I saw it, I thought it was a good solid score, there's a lot more pressure in finals and one mistake can cost you."

Bishop said his routine was about "being clean and nailing it, which I did".

Proud parents Stephen and Rosanne and sisters Nicola and Sarah were in the stands, but his other sister, Aimee, was at home with her three-month-old.

There was also plenty of pride flowing out of Phillips, who first coached Bishop when he started gymnastics as a seven-year-old at the Tri Star club in Auckland.

There was some nice symmetry with Phillips having won New Zealand's last gymnastics medal at the Games, 16 years ago, and Bishop having himself started coaching youngsters at the club.

"Dave came in ranked seventh and top-five would have been a really good outcome for him, but they kept falling and we stayed in the medals," Phillips said.

"It was a great routine under pressure.

"We were hopeful for a medal, but we knew the others had to be off their game. "The top three qualifiers are world class athletes and fully professional.

"It's incredible that David could crack the top-three."

Phillips said the medal was a great boost for the sport in New Zealand, which doesn't receive any government funding at elite level.

"This matters a lot to us. We do it for the love the sport so the sacrifice doesn't matter, but it's just that Dave was able to have a good crack at the Commonwealth Games and get a medal.

"He trains 30 hours a week and works part-time so it's exciting for him."

Asked how they might celebrate tonight, Phillips said: "Maybe some Scottish whisky, that might be appropriate."