A mountain biker has been airlifted to hospital after suffering a heart attack while competing in a an event.

The man, described as middle-aged, became unwell while taking part in the Glentress Seven endurance challenge near Peebles in the Scottish Borders on Saturday.

The cyclist was given CPR after being attended by an event marshal, members of Tweed Valley bike patrol and other competitors who were medically trained.

Members of Tweed Valley Mountain Rescue Team used a defibrillator to provide a "life-saving" electric shock to the casualty.

He was taken by air ambulance to the Royal Infirmary Edinburgh where he is said to be "doing well".

Rescue team leader Pete Matthews said: "I'm extremely proud of how the team members reacted to the incident.

"All members of the team train hard to deal with a number of potential scenarios and it's great to see that our medical and incident management training kicked into play."

Dr Alex McDonald, the rescue team's medical officer, said the incident "shows that a combination of basic life support training and having early access to an defibrillator makes a real difference in the short time period after a casualty suffers a cardiac arrest".