MINNEAPOLIS (AP) — When Philando Castile saw the flashing lights in his rearview mirror the night he got shot, it wasn’t unusual. He had been pulled over at least 52 times in recent years in and around the Twin Cities and given citations for minor offenses including speeding, driving without a muffler and not wearing a seat belt.

He was assessed at least $6,588 in fines and fees, although more than half of the total 86 violations were dismissed, court records show.

Was Castile an especially bad driver or just unlucky? Or was he targeted by officers who single out black motorists like him for such stops, as several of his family members have alleged?

The answer may never be known, but Castile’s stop for a broken tail light Wednesday ended with him fatally shot by a suburban St. Paul police officer, and Castile’s girlfriend livestreaming the chilling aftermath.

The shooting has added a new impetus to a national debate on racial profiling; a day after Castile died, a black Army veteran killed five officers in Dallas at a demonstration over Castile’s killing and another fatal police shooting, in Louisiana.

The Castile video “is pretty horrific,” said Gavin Kearney, who in 2003 co-authored a report to the Minnesota Legislature on racial profiling in the state. “There are things we don’t know about it. But we know there are certain assumptions and biases — whether explicit or implicit — about black men that affect how police officers interpret their actions. And we know white drivers are less likely to be pulled over.”

Court records dating to 2002 show Castile, a 32-year-old school cafeteria supervisor, averaged more than three traffic stops per year and received citations for misdemeanors or petty misdemeanors.

Many charges were dismissed, but Castile pleaded guilty to some, mostly for driving after his license was revoked and driving with no proof of insurance. However, those two charges also were the most frequently dismissed, along with failing to wear a seat belt.

The records show no convictions for more serious crimes.

No recent information is available on the racial breakdown of drivers stopped or ticketed by police in Falcon Heights, the mostly white suburb where the shooting occurred, or in other Minnesota towns. Minnesota is not among the handful of states that require police to keep such data.

But in 2001, the Legislature asked for a racial profiling study and it fell to Kearney, then at the Institute on Race & Poverty at the University of Minnesota Law School, to conduct it. His study, using information supplied voluntarily by 65 law enforcement jurisdictions in the state, found a strong likelihood that racial and ethnic bias played a role in traffic stop policies and practices. Overall, officers stopped minority drivers at greater rates than whites and searched them at greater rates, but found contraband in those searches at lower rates than whites.

The analysis found the pattern was more pronounced in suburban areas. In Fridley, New Hope, Plymouth, Sauk Rapids and Savage combined, blacks were stopped about 310 percent more often than expected.

The St. Anthony Police Department, which employs the officer who shot Castile, did not participate in the study. St. Anthony officials have not commented on Castile’s stop since shortly after the shooting.

It was not immediately clear how much money governments in the Minneapolis-St. Paul area generate from traffic violations. A U.S. Department of Justice investigation following the 2014 police shooting death of Michael Brown, a black, unarmed 18-year-old, in Ferguson, Missouri, found law enforcement efforts were focused on generating revenue for that city. Most of the tickets and fines were going to blacks.

Castile’s girlfriend, Diamond Reynolds, a passenger in the car, said the two officers who stopped them said the vehicle had a broken tail light. She said one of the officers shot him “for no apparent reason” after he reached for his ID.

Valerie Castile said she thinks her son “was just black in the wrong place.” Minnesota Gov. Mark Dayton said he did not believe it would have happened to a white motorist.

The officer who shot Castile, Jeronimo Yanez, is Latino. His lawyer, Thomas Kelly, said Saturday that his client reacted to the fact that Castile had a gun, not his race, though Kelly would not discuss what led Yanez to initiate the traffic stop.

“Police understand the concerns about choices made about who gets stopped and what happens when they get stopped,” said Darrel Stephens, executive director of the Major Cities Chiefs Association.

But the statistics can’t simply be attributed to racial bias among police.

“When people call the police, they provide a description of somebody engaged in a crime. The police respond to those descriptions,” said Stephens, a former Charlotte, North Carolina, police chief. “That counts for part of the disproportionality that we see in those numbers.”

Last year, the President’s Task Force on 21st Century Policing recommended police departments collect and analyze demographic data on all stops, searches and seizures.

Nationally, 13 percent of black drivers were pulled over at least once in 2011, compared with 10 percent of the white drivers, according to a survey by the U.S. Justice Department’s Bureau of Justice Statistics.

The survey shows 68 percent of black drivers considered the stops legitimate compared with 84 percent of white drivers.

The precise reasons why certain motorists are pulled over more than others are difficult to identify, said Lorie Fridell, an associate professor of criminology at the University of South Florida, who trains police departments through a program called Fair and Impartial Policing.

“Our implicit biases are most likely to impact us when we’re facing ambiguous situations,” Fridell said. “A person reaching into a pocket is ambiguous. If I, as a white, middle-aged woman, reach into my pocket most people aren’t going to experience fear. For a black male with dreadlocks, that ambiguous action would produce fear in many people.”

(© Copyright 2016 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.)

Related Stories

Lawyer: Officer Who Shot Castile Reacted To Gun, Not Race

Officer Who Shot Philando Castile ‘Incredibly Sad’ For His Family

Rev. Jesse Jackson Meets With Dayton, Castile’s Girlfriend In St. Paul

Co. Attorney Undecided On Using Grand Jury In Falcon Heights Shooting

Falcon Heights Officials Meet With Civil Rights Leaders, Protest Planned

Dayton Urges Nonviolence, Patience During Shooting Investigation

Rep. Zerwas: Dayton ‘Made Things Worse’ With Comments On OIS

Co. Prosecutor Has Not Met With Castile Family

Shooting Victim’s Girlfriend Speaks Out On Dallas

BLM Supporters Condemn Violence During Dallas Protest

Jay-Z Releases Protest Song Following Police Shootings

Neighbors Support Demonstrations At Governor’s Mansion

Police Fatally Shoot Man During Traffic Stop, Aftermath Video Posted