Defibrillators are to be installed in every Scottish NHS dental practice.
The £1m Scottish government scheme aims to boost the survival chances for people who have cardiac arrests.
The 970 defibrillators will also be mapped by ambulance staff so call handlers can direct people to the nearest one while patients wait for paramedics to arrive.
More than 1,500 Scots died in the community last year after suffering a cardiac arrest.
A defibrillator can be used by anyone to deliver an electric shock to the chest to restore a person's heart to a normal rhythm after a cardiac arrest.
'Every second counts'
Ministers said that currently, only 5% of people who have a cardiac arrest in the community survive and every minute of delay cuts their chances.
Public Health Minister Michael Matheson said: "Every second counts when someone's heart goes into cardiac arrest and having access to a defibrillator can mean the difference between life and death.
"As these machines are becoming easier to use it is only right that the public have more access to its life-saving potential in any public place.
"There are almost 1,000 NHS dental practices in the centre of Scottish communities. By giving them this equipment we are providing 1,000 more chances to save a life.
"I believe that this investment will save many more lives."
The machines are expected to be in place by the end of August.
Any dental practice which has already bought a defibrillator will be compensated.