RICHMOND -- A veteran Richmond police officer who was twice fired by the city before regaining his job sued the city and police Chief Chris Magnus for¿ at least $5 million last week, alleging that he is the victim of years of racial discrimination and harassment on the job.

Dedrick Riley, 43, filed an 18-page suit in U.S. District Court in San Francisco on Friday alleging that he has been subjected to "differential terms and conditions of employment because of his race, color and national origin" and "adverse employment actions and harassment not experienced by similarly situated employees whom were not African-American, as well as excessive scrutiny, criticism and discipline not otherwise directed at similarly situated Caucasian employees."

Hired in 2003, Riley claims that during his early years on the force, before Magnus arrived in 2006, he earned "exceptional" reviews for his performance but that discrimination and targeted lies undermined his career and thwarted his advancement.

Riley could not be reached for comment. Richmond police leaders and City Attorney Bruce Goodmiller acknowledged the lawsuit but declined to comment.

Riley is no stranger to controversy. He was first fired in 2006 for allegedly lying about his using force against a homeless man on 23rd Street. He won his job back through arbitration.

Riley was fired again over accusations that he used excessive force in March 2009, when a fellow officer said Riley repeatedly punched a man whom he had observed smoking crack. A jury in January 2012 acquitted Riley of unnecessary assault by an officer, filing a false police report and battery.

The police department briefly placed Riley on leave earlier this year following an altercation between him and a neighbor in Fairfield, where Riley lives. The other man claimed Riley assaulted him and pointed a gun at him, according to a police report on the incident obtained by this newspaper. Riley was briefly detained but not arrested.

In May, a Solano County judge threw out Riley's request for a restraining order against the neighbor, calling the officer "dangerous" and saying his court action was "not brought in good faith."

Riley has been relegated to administrative duty -- off Richmond streets -- for more than a year, according to the complaint.

"The desk duty he has been assigned to, ostensibly on a permanent basis, ensures that Plaintiff will never gain the field experience necessary to advance in the police department," the suit states. The suit also alleges that Riley is routinely denied opportunities to work overtime shifts, costing him "approximately $90,000 per year in compensation he would have otherwise received."

Riley's discrimination suit is not the first by a black officer against the city and Magnus, who is white. Seven high-ranking African-American police officials had sought damages of around $18 million for what they alleged were a series of racial digs as well as systemic discrimination by Magnus and his former deputy chief.

After years of legal wrangling, millions in costs and months of trial, a Contra Costa County jury ruled last year that the allegations were untrue and the plaintiffs were entitled to nothing.

Riley's attorney, Dustin Collier, was part of the legal team that that unsuccessfully sued Magnus and the city in that case.

Contact Robert Rogers at 510-262-2726 or rrogers@bayareanewsgroup.com. Follow him at Twitter.com/SFBaynewsrogers.