The police officer who wrestled a black teenage girl to the ground at a pool party in Texas and drew his gun on other teens in the vicinity has resigned. The local police chief said Eric Casebolt’s actions were “indefensible,” and he was “out of control.”

The video of officer Casebolt pushing Dajerria Becton, 15, to the ground and pointing his firearm at other teens went viral. It also shows him briefly running after teenagers before being stopped by fellow police officers.

Casebolt also dispersed a group of girls, shouting, “I don’t care, you’re leaving now.” Moments later he is seen walking up to and detaining a black female teen who was reluctant to leave immediately.

READ MORE: ‘I thought he was going to shoot the kid’: Teenage pool party incident witness recalls Texas cop abuses

The McKinney police chief Greg Conley told reporters that Casebolt was “out of control” in his response to the pool party disturbance on June 5 and that the police officer had resigned voluntarily.

Chief Conley added that Casebolt’s actions were "indefensible."

"Our policies, our training, our practice do not support his actions. I had 12 officers on the scene and 11 of them... did an incredible job,” he said.

About a dozen police officers had gone to a community pool in the Dallas suburb in response to reports of teens fighting.

McKinney Mayor Brian Loughmiller told reporters the “incident is not indicative of McKinney as a whole.”

It is not clear how Casebolt’s resignation will affect the investigation, which is expected to be concluded by the end of the week, according to Fox News. The incident provoked outrage in the community and throughout the country.

Hundreds took to the streets of the Texas town protesting the brutal treatment of teenagers. Protesters carrying signs saying “My skin color is not a crime," and “Fire Eric Casebolt.”

READ MORE: McKinney pool party video: Protests over police drawing gun at teenagers

Chief Conley confirmed that there had been some other complaints against Casebolt, but could not go into any details at this stage. The McKinney Fraternal Order of Police, however, denied that the incident was racially motivated.

"The McKinney FOP assures that this was not a racially motivated incident and can say without a shadow of doubt that all members of the McKinney FOP and McKinney PD do not conduct racially biased policing," lodge president Daniel Malenfant said in a statement cited by ABC News.

Federal court documents, however, show that police officer Casebolt and other law enforcement officials were sued in 2008 in federal court for racial profiling, harassment, failure to render aid and sexual assault during a traffic stop.

The suit was filed by Albert E. Brown, Jr., who alleged Casebolt had stopped him in 2007, due to his car being parked on the wrong side of a road in McKinney. The police officer told Brown he was going to write him a ticket but then said he saw two marijuana seeds, and an open container in the car.

Brown said Casebolt also remarked about the “white girls” who were with him and made comments about him and his clothes. Casebolt then searched the car.

Brown also claimed that another officer, Lee Keith, slammed his head into the hood of the car repeatedly, and Keith held him while Casebolt pulled his pants down. Another officer, who was not named in the lawsuit, allegedly spread his legs while one of the law enforcement officials shined a flashlight towards his anus.

In their defense, the officers claimed that Keith had to grab Brown when the suspect reached for Casebolt’s gun and arrested the suspect for marijuana possession and attempting to take a weapon from an officer.

The civil case was dismissed by a federal judge in 2009 because the criminal charges against Brown were still pending, according to ABC News. Brown was told he could re-file the lawsuit if he was exonerated. Brown opted not to re-file the complaint, once the criminal charges were dropped.

Before joining the McKinney police in 2005, Casebolt served as a trooper in the Texas Highway Patrol. Prior to that, he served in the US Navy from 1993 to 2003, as an operations specialist for seven years and in the military police for three years, reported local Fox affiliate KDFW.

Casebolt was listed as a martial-arts instructor at Executive Self-Defense & Fitness Training, before the McKinney-based company removed all references to him from its website.