President Barack Obama is on pace to leave the White House with a smaller federal prison population than when he took office – a distinction no president since Jimmy Carter has had, according to a Pew Research Center analysis of data from the Bureau of Justice Statistics.

The number of sentenced prisoners in federal custody fell 5% (or 7,981 inmates) between the end of 2009, Obama’s first year in office, and 2015, the most recent year for which BJS has final, end-of-year statistics. Preliminary figures for 2016 show the decline continued during Obama’s last full year in office and that the overall reduction during his tenure will likely exceed 5%.

By contrast, the federal prison population increased significantly under every other president since 1981.

During the eight years of Ronald Reagan’s tenure, for example, the number of sentenced inmates in federal custody rose 78% (or 16,539 prisoners), the largest percentage increase for any administration on record. It went up 39% (16,946 prisoners) during the four years of George H.W. Bush’s presidency; 56% (38,769 prisoners) during the eight years of Bill Clinton’s tenure; and 32% (36,784 prisoners) during the eight years of George W. Bush’s administration. In absolute numbers, the increase during Clinton’s tenure was the largest on record.

Despite serving only four years, Carter presided over a 34% decline in sentenced prisoners between 1977 and 1980, a reduction of 9,625 inmates. The decline during Carter’s tenure was the largest of any president on record, both as a percentage and in absolute numbers.

It’s important to note that presidents are just one of many factors that can affect the size of the federal prison population. Crime rates, law enforcement practices and judicial sentencing patterns also can play a role. (Crime rates, for instance, rose sharply during the 1980s, but have generally fallen since.) Still, presidents can help set federal criminal justice policies, and those policies can affect the prison population.

Obama has made criminal justice issues a focus of his presidency. Among other things, he has overseen a Justice Department initiative that emphasizes lighter sentences for those convicted of lower-level crimes and used his executive clemency power more frequently than any other modern chief executive.

Reagan also focused on criminal justice during his presidency, but in a different way: He signed into law several measures that increased federal penalties in response to rising crime. Among the policies enacted during his presidency was the elimination of parole in the federal prison system.

To determine changes in the federal prison population under each administration, we analyzed BJS data that go back to 1925. The data exclude prisoners who have not yet been sentenced and those who are not in the physical custody of the federal government (such as those in private, contracted prisons). In years in which multiple presidents served, we attributed the change in the inmate population to the president who served the majority of the calendar year: Richard Nixon, for example, served until August 1974, so we counted that year under his administration, rather than Gerald Ford’s.

John Gramlich  is an associate director at Pew Research Center.