The European Parliament has voted for an EU-wide emergency alert system dubbed eCall to help ambulance crews get to road accidents faster.
New cars and light vans will have the system as standard from 31 March 2018.
The eCall device will alert rescue services automatically, using the existing 112 emergency number.
Basic data will be sent only when an accident occurs. The technology was first proposed in 2012, but legislation was delayed amid privacy concerns.
After negotiations between MEPs and EU governments it was agreed that eCall would provide only basic data such as:
type of vehicle
time of accident
The European Commission says installation of the device is likely to add about €100 (£72; $109) to the cost of a new car.
Media captionOlga Sehnalova MEP explains the eCall car alert system
A standard accident alert system is needed in Europe, because "when you cross a border you have a language problem and often do not even really know where you are", said Czech Social Democrat MEP Olga Sehnalova, the parliament's lead negotiator on the issue.
MEPs in favour of the plans say rescue services will be able to reach crash scenes faster, saving lives and reducing the severity of injuries.
Research suggests that the system could halve response times, especially in rural areas.
Ms Sehnalova said privacy would be protected.
"The information is transferred only at the moment a serious accident occurs and airbag are sensors set off. Then a standard set of information is sent to the rescue services."
Media captionGreens MEP Albrecht opposes the eCall emergency system
But Jan Philipp Albrecht from the Greens said the technology should not be mandatory.
"The consequence of being connected all the time means that we are also subject to more possibilities to track us," he told the BBC.
"We reduced the data being processed to a very minimum, but nonetheless it is technically possible for companies, or for an authority, to track your position and to even surveil you. So I don't think this should be obliged to everybody. Everybody should have the chance to opt out."
The UK government objects to the plans. UK Transport Minister Claire Perry said "the benefit of making eCall mandatory in all new cars does not justify the cost of implementing it.
"We do not support the measure, because it is not cost-effective for us."
Source: BBC news