Smartphones can detect when you've had too much to drink by monitoring your walk, a study has found.
American researchers used sensors in smartphones to detect when somebody was over the legal drink-drive limit.
Phones were able to do this with about 90% accuracy when users walked just 10 steps in the study by the University of Pittsburgh.
Scientists hope the discovery can be used to develop device alerts, such as asking people not to drive while drunk.
"We have powerful sensors we carry around with us wherever we go," lead researcher Brian Suffoletto said.
"We need to learn how to use them to best serve public health.
" The study had 22 participants aged 21 to 43, who were given a vodka and lime juice drink every hour until they reached 80 milligrammes of alcohol per 100 millilitres of blood.
In the US and in England, Wales and Northern Ireland, this is the alcohol limit for drivers.
In Scotland, the limit is 50 milligrammes of alcohol per 100 millilitres of blood.
With a smartphone strapped to their back, the participants performed a walking task every two hours - walking a straight line for 10 steps, turning around, and walking back.
About 90% of the time, the researchers were able to identify those over the limit through changes in gait highlighted by the phones.
One application could be to notify users who may not think they are impaired that they should not drive.
"I lost a close friend to a drinking and driving crash in college," Dr Suffoletto said.
"And as an emergency physician, I have taken care of scores of adults with injuries related to acute alcohol intoxication.
"Because of this, I have dedicated the past 10 years to testing digital interventions to prevent deaths and injury related to excessive alcohol consumption.
" Although this is a small preliminary study, the scientists hope it lays a foundation for further research.
They want to carry out additional experiments which better mimic how people carry their phones, like in their hands or pockets.
"This is a controlled study but in any wider public application, you'd have to consider how this data is collected and used," Professor Daniel Dresner, a cyber security expert at the University of Manchester, said.
"There is no limit as to the ingenuity of the uses that data can be put to or misused but, it's important to remember how this science may be adapted in future.
Could it connect to the car immobiliser so it won't let you drive? Will it alert a friend, or the authorities, if you shouldn't be driving?" Last year, almost 360,000 admissions to English hospitals were primarily due to drinking alcohol, with about 6,000 alcohol-specific deaths.
"In five years, I would like to imagine a world in which if people go out with friends and drink at risky levels, they get an alert at the first sign of impairment and are sent strategies to help them stop drinking and protect them from high-risk events like driving, interpersonal violence and unprotected sexual encounters," Dr Suffoletto said.