Railway staff were unable to access the public defibrillator when a man collapsed on the platform at Oban train station.
Scotrail workers went to the aid of the man and ran to the nearby Clock Tower in Station Square where a defibrillator is situated.
But when they called 999 to get the code to open the box containing the life-saving equipment, none of the operators had a record of it, costing vital minutes in the emergency situation.
The drama unfolded just before 9am as the first train to Glasgow was due to leave on Friday.
Fortunately ambulance staff were on scene within six minutes of receiving the call.
Oban man Stanley Jeffery was at the station when the incident took place. He called for defibrillators to be placed on trains and in all businesses.
Mr Jeffery, a landscape gardener, said: “I was dropping off my oldest daughter. Just before she got on the train a woman ran passed shouting at staff asking if they had a defibrillator. We saw a man was lying on the ground at the sheltered area. All of the staff were running about trying to help as best they could.
“When I left the train station I saw two members of staff at the Clock Tower trying to access the defibrillator. Afterwards I found out they couldn’t get in to it. Luckily the ambulance arrived very quickly.
“I think all of the businesses should have their own defibrillators. They should have them on the train, what happens if something happens between stations? They are not expensive. The members of staff in the train station were fantastic, really quick. It’s added pressure on them if they don’t have the equipment.
“I do the grounds for Ballet West and they have their own defibrillators.”
A spokesman for Scotrail said: “I can confirm that an ambulance was called to Oban station, and attended a customer who had fallen ill at around 8.50am.
“We already have plans in place, prior to this incident, to install defibrillators at over 30 locations across our network. Oban is one of them.”
A spokeswoman for the ambulance service said: “We were on the scene within six minutes and transferred the patient to hospital. At the time of this incident, this public access defibrillator was showing as unavailable and we will be fully investigating the circumstances with the local community.”
The condition of the man, who was not believed to be local to the Oban area, is unknown.
It is understood the defibrillator was installed by Argyll and Bute Council following an anonymous bequeathal. No-one from the council was available to comment yesterday.