On Thursday, the House of Representatives passed the Juvenile Justice and Delinquency Prevention Act. It now will go to the White House for President Donald Trump's signature.

The criminal justice buzz on Capitol Hill this week is that Senate Majority Leader Mitch McConnell, after stalling for weeks, will finally allow a prison reform bill called the First Step Act to come up for a vote. The legislation, which would reduce some federal mandatory-minimum sentences, could make it to President Trump’s desk by the end of this year.

But that’s not the only perpetually-in-limbo crime bill that, in the span of a few days, suddenly appears likely to make it through a logjammed Congress and get signed into law.

With much less fanfare, the Senate on Tuesday passed major juvenile justice legislation that has been postponed and picked over for more than a decade—and that would ban states from holding children in adult jails even if they’ve been charged with adult crimes.

The Juvenile Justice and Delinquency Prevention Act, which is expected to pass the House as soon as today, would also require states receiving federal dollars to collect data on racial disparities in the juvenile system and to come up with concrete plans for addressing those inequities. It would ban the shackling of pregnant girls, as well as provide funding for tutoring, mental health, and drug and alcohol programs for kids.

Despite the president’s usual tough-on-crime rhetoric, congressional staffers and youth advocates said he appears unlikely to veto the bill, which has bipartisan support and hasn’t generated much attention on Fox News or among his base supporters.

“After hearings and briefings and votes and re-votes, finally, this hundred-page bill, this huge lift, which matters so much for kids, is actually going to be passed in a bipartisan and bicameral fashion,” said Marcy Mistrett, CEO of the Campaign for Youth Justice, an advocacy group. “In the current political environment, that’s a really big deal.”

The passage of the juvenile reform bill just as the First Step Act moves toward a vote comes at a pivotal time for federal oversight of local youth court systems. The legislation is a new version of a law that first passed in 1974 but expired in 2007. In the decade since, racial disparities in juvenile justice have dramatically worsened, and the Trump Justice Department has taken a quiet but decisive turn away from its mandate to try to reduce such inequality.

According to a Marshall Project report in September, a little-known DOJ agency called the Office of Juvenile Justice and Delinquency Prevention has, under Trump appointee Caren Harp, cut back on its data-gathering and monitoring of states’ attempts to fight racial inequity.

But under the newly passed juvenile justice bill, that office will now face significantly increased congressional oversight, said Republican congressman Jason Lewis of Minnesota, who along with Bobby Scott of Virginia, a Democrat, spearheaded the House version of the legislation.

The underlying purpose of the Juvenile Justice and Delinquency Prevention Act is to use the promise of federal money to ensure four “core protections” for children in states’ youth justice systems. These include not locking kids up for age-based “status offenses” such as truancy, running away and curfew violations; removing them from adult jails, with few exceptions; always keeping them separate from adult inmates; and making states research and address racial disparities.

But earlier versions of the law contained a loophole: Juveniles charged as adults could be held in adult jails pretrial. As a result, according to a recent UCLA study, more than 32,000 youth spend time in adult facilities each year.

The new bill would require that problem be fixed within three years, although it would still contain a “rural exception” letting jurisdictions with no juvenile detention facility hold kids in their adult jail for a period of a few hours while they await transportation elsewhere.

Despite the bipartisan support for these changes, the legislation has been caught up for years in disputes over details. Its current version, for instance, contains a section providing shelters and outreach programs for runaway and homeless children, which some senators said should be more robust or be contained in a separate bill. But they reached a compromise.

The bigger obstacle was Sen. Tom Cotton, a Republican from Arkansas, who nearly single-handedly held up the bill for more than two years because he felt that judges should have the discretion in some cases to lock up teenagers for status offenses, including truancy and curfew violations. Eventually, he was convinced to accept a seven-day limit on detaining kids for these kinds of crimes—which is also a compromise for youth advocates who had sought an outright ban.

The new juvenile justice bill, like the First Step Act, is far from comprehensive. It budgets relatively little money—$80 million spread among the states—to fix problems as entrenched as racial disparities facing teens in the court system.

But those who have worked on the legislation for years are surprised it passed the same week that a chance for a vote finally came along on a criminal justice bill many believed would never see the light of day, either.

“You know, this is part and parcel of Washington,” said Lewis in an interview. “You come here and you serve with 434 other type-A personalities in the House and 100 folks over in the other chamber and if you think you’re gonna get everything you want, you’re in the wrong business.”