Senior Sergeant Mel Aitken, of Dunedin, said the 18-year-old Dunedin man was texting as he drove on State Highway 88 towards Ravensbourne, when he swerved and lost control.
The car crossed the road, spun and hit a tree.
Snr Sgt Aitken said the man received minor injuries and was lucky not to have been seriously hurt.
"He's very lucky, given where he's ended up. It's also lucky he had a sunroof.
"The dangers of texting while driving are clear in this incident."
Charges were likely, she said.
New Zealand Transport Agency statistics show cellphone use has been cited as a factor in 424 crashes on New Zealand roads since 2009.
The figures included 15 fatalities and 24 crashes resulting in serious injury.
Using cellphones while driving was outlawed nearly four years ago, but the figures show hundreds of motorists are still flouting the law.
Earlier this week, the New Zealand Automobile Association called on police to mount a new campaign against drivers using cellphones.
Snr Sgt Aitken said a young driver was killed in May last year, near the scene of yesterday's crash, when his car collided with a truck.
However, the incident was not believed to be related to cellphone use, she said.