The white McKinney, Texas, cop who was recorded on a now-viral video tackling a black teen girl and pointing his gun at two unarmed black teens was previously accused of racial bias and sexual assault by a man he arrested in 2007.

Federal court documents show that David Eric Casebolt and other officers were sued in 2008 in federal court for racial profiling, harassment, failure to render aid and sexual assault.

The handwritten lawsuit was filed by Albert E. Brown Jr., who was being held in jail on pending charges related to the traffic stop at the time.

Casebolt resigned from his position with the department on Tuesday, four days after the June 5 incident.

Brown Says Casebolt Pulled Down His Pants on the Side of the Road & Touched His ‘Private Area’

Brown accused Casebolt of reaching into his “private area” and pulling his pants “down below ankles” during the traffic stop.

Brown was parked on the wrong side of a road in McKinney, according to the civil complaint. Casebolt told Brown he was going to write him a ticket for the traffic offense, 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.

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

In their response to the lawsuit, the officers claimed that Keith had to grab Brown when the suspect reached for Casebolt’s gun.

Read the lawsuit below:

The Lawsuit Was Dismissed Because State Charges Were Still Pending, but Was Never Refiled

Brown was arrested by Casebolt and the other officers on charges of 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. The judge said in his decision that the lawsuit could be re-filed if he was exonerated. The criminal charges were also eventually dismissed, but the civil case was never refiled by Brown.

Read the judge’s decision below: