Secret Service agents are reflected in a puddle as U.S. President Barack Obama arrives to board Air Force One at Stansted Airport in Stansted, Britain April 24, 2016. REUTERS/Kevin Lamarque

(Reuters) - The U.S. Secret Service has agreed to pay $24 million to settle a 17-year-old federal lawsuit filed by a group of black agents who accused the agency of racial discrimination in its employment practices.

The agreement settles a protracted legal battle that began in 2000 when 10 black agents filed a lawsuit in a Washington D.C. federal court, claiming the Secret Service had violated the civil rights of black agents for decades while ignoring their complaints, court records showed.

“Had the matter gone to trial, it would have required that we re-live things long past, just at a time when the Secret Service is on the mend,” Secretary of Homeland Security Jeh Johnson said in a statement. “This settlement is also, simply, the right thing to do.”

The 10 agents accused the Secret Service of racial discrimination in how it selected agents for promotions. They also claimed the agency conducted unfair hiring, assignment and transfer practices while fostering a racially hostile workplace, court documents showed.

A group of more than 100 agents joined the lawsuit over time, the Washington Post reported. Under the resolution, the Secret Service could pay as much as $300,000 each to the agents who originally sued the agency.

“At long last . . . black Secret Service agents will not be constrained by the glass ceiling that held back so many for so long,” Jennifer Klar, a lawyer for the agents, told the newspaper.

The Secret Service admitted no wrongdoing, but agreed to reform its employment and promotion practices, the complaint process for employees and how it keeps records, the agreement said.

The agency, charged with protecting the president and his family, has dealt with a lengthy list of problems during the past few years, including a prostitution scandal in Colombia and a high-profile security lapse when a man jumped the fence surrounding the White House complex and ran into the mansion armed with a knife.