A former Minnesota state trooper admitted to texting nude or partly nude photos of a woman from her phone to his while responding to a traffic crash.

Albert Kuehne, 37, pleaded guilty on Tuesday to nonconsensual dissemination of private sexual images, The Minneapolis Star Tribune reported. The felony count of harassment is being dismissed.

Kuehne responded to a single-vehicle crash in March of last year when he detained a 25-year-old woman on the suspicion of drunk driving, according to the charges. She was taken to the hospital and was later released.

Her boyfriend was later using her laptop, which is linked to her phone, and discovered that someone had texted the nude photos to an unknown number.

When the boyfriend called the unidentified number, the person on the other line identified himself as Kuehne, according to the criminal complaint.

The woman reached out to a lawyer and the incident was reported, triggering an investigation by the state Bureau of Criminal Apprehension.

Video from the scene showed Kuehne leading the woman to his squad car. On the way, she pulled out her phone and he demanded that she turn it over to him.

Footage showed that Kuehne was alone in his vehicle when three photos were sent from the womans phone. She was being treated by paramedics at the time, according to the complaint.

Investigators executed a search warrant and seized the troopers phone, where they discovered the images.

He was placed on paid administrative leave on May 20 before being fired on Oct. 2. The Peace Officer Standards and Training Board said this week that he is also no longer licensed to serve in law enforcement.

In June 2018, he was one of two troopers and a trainee placed on leave after they pursued a driver at speeds up to 80 mph before the other car veered off the road into a playground, seriously injuring three children.