The bill’s passage also depended on timing, in at least two ways. First, if the First Step Act had not passed in this brief lame-duck session, advocates expected their window of opportunity to close. “Saying that we’ll do it next year is tantamount to saying this just isn’t going to get done,” Senator Mike Lee, the libertarian-leaning Utah Republican, told The Wall Street Journal last month. A Democratic House majority might have demanded more than Trump was willing to accept, leading Republicans to withdraw their support, and the new Senate would have been slightly less favorable.

The lame-duck session also offered the best chance to get Republicans to support criminal-justice reform that primary opponents could use to tar incumbents as “soft on crime.” Members of Congress may have always resisted risky votes close to an election, but the inexorable creep of the permanent campaign has broadened the definition of “close to an election” to cover more and more of the 24 months between balloting. Rank-and-file members ask the leadership to shield them from votes likely to encourage a primary challenger or demotivate their core supporters, as some Republicans had been pressuring McConnell to kill the bill.

It used to be that odd-numbered years offered the best chance for significant legislation, while campaigns dominated election years; now the time for ambition may be the few weeks immediately after elections, when voters are paying the least attention and politicians have the longest amount of time possible to let unpopular votes fade into the past.

Trump’s support gave the bill the boost it needed to get back on track after McConnell’s dilatory tactics. The “Nixon to China” factor comes into play whenever a president with a strong reputation on one side of an issue oversees a policy shift in the opposite direction. Nixon was known as a hawk who was tough on communism, so he had the credibility to build a relationship with China’s communist leaders. Trump had spent the fall blasting Democrats as soft on crime (as well as immigration, trade, and a litany of other issues), but soon after last month’s midterm elections, he announced his endorsement of the prison-reform measure.

“Trump wasn’t a leader in the last couple of years, but in the last couple of months it did help,” said Marc Mauer, director of the advocacy group the Sentencing Project. Tolman, the former prosecutor, said the president’s backing helped persuade more Republicans to support the First Step Act, since GOP primary opponents will now have a harder time casting supporters as bleeding hearts. Trump tweeted his desire for McConnell to bring the bill to the floor.

Finally, there was the Jared factor: The real Trump-administration power behind the bill came from Trump’s adviser and son-in-law, Jared Kushner, who made prison reform a priority after seeing his developer father as a federal inmate for tax evasion and illegal campaign contributions. The pressure, along with increasing support among GOP senators, helped persuade McConnell to reverse course and schedule a vote.

The First Step Act does mark a significant bipartisan accomplishment, but it came together only amid a rare alignment of conditions, structural and political. It’s likely to remain the exception to the rule of partisan gridlock. The forecast doesn’t call for another perfect storm anytime soon.

This article is part of our project “The Presence of Justice,” which is supported by a grant from the John D. and Catherine T. MacArthur Foundation’s Safety and Justice Challenge.

We want to hear what you think about this article. Submit a letter to the editor or write to letters@theatlantic.com.