Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

WASHINGTON — The last thing Ato Walker expected when he went out for a pre-birthday drive in 2014 was to have a traffic stop escalate into a physical encounter with police, then have his bail set at more than $165,000.

After his bail was reduced to $85,000, his mother used her retirement savings to pay a bail bondsman the nonrefundable, mandatory 10 percent to free him.

His case was eventually thrown out, but the memory lingers.

“There are too many people that are up-charged, like I was," Walker said.

Now two senators from opposing parties — Rand Paul, R-Ky., and Kamala Harris, D-Calif. — are working on a bill to overhaul the nation's bail system in an attempt to prevent what happened to Walker from happening to others. The bill, titled the Pretrial Integrity and Safety Act, aims to address what the senators see as flaws in the system by providing grants to states and Indian tribes to change or replace it.

Sen. Rand Paul, R-Ky., a vocal opponent of the Senate Republican healthcare bill, speaks with reporters on his way to a vote on Capitol Hill on July 12, 2017 in Washington. File J. Scott Applewhite / AP File

“In our country, whether you stay in jail or not is wholly determined by whether you’re wealthy or not — and that’s wrong,” Harris said in a news release. “We must come together to reform a bail system that is discriminatory, wasteful and fails to keep our communities safe.”

The Morning Rundown Get a head start on the morning's top stories. This site is protected by recaptcha

In a New York Times op-ed in July, the two senators said there are “450,000 Americans who sit in jail today awaiting trial because they cannot afford to pay bail.”

Bail is aimed at making sure defendants, depending on the severity of the charges they face and their flight risk, return to court. Those with limited means, however, often find themselves unable to post bail, which can lead to job loss and child custody issues, or forced to borrow from bail bondsmen.

The current bail system is “one of the greatest injustices in a system that already has major injustices” said Udi Ofer, the ACLU's deputy national political director and the director of its Campaign for Smart Justice, which works to address racial disparities in the criminal justice system.

He points to New Jersey as a state that was ripe for reform.

“You had a Republican governor working with a Democratic-controlled legislature and working with the judiciaries that understood the need for reform," Mr. Ofer said. "It’s really a testament to how government can work in contrast to what we are currently seeing on the federal level where there is such little cooperation.”

New Jersey has begun using an algorithm that helps set conditions for pretrial release or holds a defendant in jail until trial. As a result, the number of people held before trial in the state has dropped by roughly a third, according to the New Jersey Court Criminal Justice Reform data.

Arizona and Kentucky use similar algorithms, as do some counties in other parts of the country.

If the senators' bill passes, “Americans should be able to expect fair and equal treatment under the law regardless of how much money is in their pockets or how many connections they have," Paul said in a statement.

Paul is no stranger to working with Democrats.

This year he has reintroduced three bills he had proposed before, aimed at reducing juvenile solitary confinement, reforming the criminal justice system and allowing federal judges to go below the minimum sentence in certain cases.

He also spoke out against Attorney General Jeff Sessions for instructing federal prosecutors to seek maximum sentences and seize suspect’s property without evidence.

Sen. Kamala Harris, D-Calif., questions Attorney General Jeff Sessions about his role in the firing of FBI Director James Comey and the investigation into contacts between Trump campaign associates and Russia, on Capitol Hill in Washington, Tuesday, June 13, 2017. J. Scott Applewhite / AP

Harris, a former prosecutor, has also pushed criminal justice reform, saying she was being “smart on crime” by trying to end the cycle of mass incarceration and recidivism, and by modernizing police practices and technology.

As attorney general of California, she introduced the first statewide mobile app that gave officers instant access to criminal justice information; created a pilot program for the use of body cameras; and began an incentive for programs that seek to lower the risk of inmates' relapsing after their release.

The time might be right for Congress to address the issue, Ofer said.

“The movement for bail reform is as strong as ever," he said. "We’ve seen good progress this year.”