The police officer who pulled his gun on teens at a community pool party, pushed a 15-year-old girl in a bathing suit to the ground and shouted obscenities at youths resigned while under investigation Tuesday.

A lawyer for McKinney police Cpl. Eric Casebolt confirmed his resignation to Dallas media outlets Tuesday afternoon.

In a news conference, McKinney Police Chief Greg Conley called the officer's actions at a Texas pool party "indefensible."

>> Texas woman says cop who pulled gun at pool party 'deserves a medal'

Casebolt had been with the McKinney Police Department for nearly 10 years.

>> Texas teen who shot shocking video of cop at pool party speaks out

Casebolt has not made any public statements since the incident. He has been in hiding with his wife following death threats, according to his attorney, Jane Bishkin.

>> 5 things to know about Eric Casebolt, Texas officer in shocking pool party video

Before resigning, the 41-year-old McKinney, Texas, police officer had been placed on administrative leave after a YouTube video of him emerged, showing him pulling a gun and wrestling a young woman in a swimsuit to the ground during a disturbance at a pool party Friday in a North Dallas suburb. The video quickly went viral.

>> VIDEO: COPS CRASH POOL PARTY (Warning: Contains strong language)