Hundreds of police officers in the nation’s capital padded their salaries with more than $80,000 a year from money generated by automated traffic devices, commonly known as speed and red light cameras, a civil lawsuit alleges.

The revelation comes out of a racial discrimination lawsuit that was filed in 2015 but was green-lighted for trial by a federal judge earlier this month.

Sgt. Mark E. Robinson, a 27-year veteran of the Metropolitan Police Department, claims that he was excluded from lucrative overtime opportunities in favor of white sergeants who were less qualified – including other officers whom he trained himself and certified.

"If D.C. is going to receives tens of millions yearly from these tickets, the least they can do is utilize the most-qualified candidate to make sure the tickets are legitimate," said Kenneth McPherson, a Maryland-based attorney representing Robinson, who still works for the police department.

In 2011, the Metropolitan Police Department "civilianized" the automated traffic enforcement unit, meaning contractors – not police officers – were in charge of issuing the tickets, according to McPherson. Robinson raised concerns over the practice at the time, arguing the law required trained police officers to issue such traffic citations, his lawyer said.

'The citizens believed they were being cited by well-trained law enforcement officers.'

— Kenneth McPherson, attorney

"The citizens believed they were being cited by well-trained law enforcement officers when, in fact, they’re receiving tickets from companies whose purpose is profit," McPherson told Fox News, saying he believes the outrage should center on the city for changing procedure to allow a private company – not officers -- to profit from the automated traffic devices.

"When police issue the citations, their careers are on the line because it’s under oath. When the contractors issue the citations, where are there any meaningful consequences to fudging the tickets in order to increase the revenue?" asked McPherson.

The process of using civilians to staff the traffic unit has taken years. During the transition period, officers have continued to rake in overtime money by working to write tickets to drivers flagged by the devices – some doubling their salaries in certain cases. Robinson, however, claims he was unlawfully excluded from the overtime earnings based on race, prompting him to file suit in 2015.

"Even though the overtime opportunities [for officers] diminished with the civilianization, they were still substantial, amounting to roughly $10 million in a two-year period," McPherson said, referring to 2014 to 2016.

An MPD spokeswoman said Monday the department cannot comment on pending litigation.

The city has argued that no full-time MPD employees were overseeing the automated ticketing once the unit was manned by civilians in 2011 using Arizona-based American Traffic Solutions (ATS). But the new procedure still required officers to approve the violations submitted by ATS before the company could send them to drivers in the mail. McPherson noted that because of this, substantial overtime opportunities continued for MPD officers.

"By 2014, MPD was utilizing some civilian technicians to deploy automated traffic devices under the supervision of sworn members," Robinson testified in a deposition. "This was consistent with General Order OPS 303.10 which required a 'member' to issue a notice of infraction for a traffic violation in the District of Columbia. A 'member' is defined to include only a sworn officer."

In an Aug. 1 decision, U.S. District Judge Rudolph Contreras ruled there was evidence of a viable racial discrimination claim and it could move forward to a jury trial.

"Mr. Robinson's supervisors knew that he wanted to work overtime but did not allow him to do so," Contreras wrote in his ruling. "A jury could reasonably find that MPD's decision significantly changed the nature of Mr. Robinson's employment, because he lost the benefits -- financial, professional and otherwise -- that come along with working in the Automated Traffic Enforcement Unit overtime program."

Washington, D.C., collected nearly $100 million from speed camera tickets in 2016 -- nearly double that issued the previous year – according to data released last month.

A July 19 report by AAA Mid-Atlantic – which obtained the figures through a public-records request to the District’s Department of Motor Vehicles -- showed that the city issued 994,163 speed-camera tickets in 2016 compared to 520,104 issued the year before. The number of tickets resulted in $99.2 million in revenue for the city.