New Jersey is changing how political power is distributed in the state ahead of this year’s census — at least when it comes to prisoners.

Under a new bill Gov. Phil Murphy signed into law Tuesday, inmates in the Garden State will now be counted as residents of their last known address when it comes to drawing the state’s legislative districts.

Previously, prisoners were counted as residents of wherever they’re incarcerated. Opponents called that “prison gerrymandering," and ending it has been a popular cause for progressive Democrats like Murphy.

New Jersey is now the seventh U.S. state to enact such a law.

“In most cases, incarceration is only temporary," said state Sen. Sandra Cunningham, D-Hudson, a sponsor of the measure. “It is unfair for inmates to be considered part of a community where they’ll likely never live as a free citizen.”

New Jersey is divided into 40 legislative districts, and each sends three legislators to Trenton to help make the state’s laws and determine how your taxpayer money is spent in the state budget.

A commission redraws the districts after the census every decade. The next time that’s scheduled to happen is 2021.

Each district should have roughly the same number of residents, according to the state constitution, which works out to more than 200,000 people. The U.S. Census reports more than 8.9 million total residents in New Jersey.

Opponents of the previous prison-counting system argued that counting inmates as members of districts they won’t live in after they are released improperly diverts power to parts of the state with the most prisons.

Though more New Jersey inmates come from Essex than any other county, according to the corrections department, most of the department’s main facilities are south of Princeton.

That has meant that while there are more than 1,600 Camden residents in state prisons in 2018, they were all counted as citizens of other counties, according to state Sen. Nilsa Cruz-Perez, D-Camden, another sponsor.

The state Assembly sponsors of the new law — Shavonda Sumter, D-Passaic; Raj Mukherji, D-Hudson; and Annette Quijano, D-Union — said changing this is "imperative to ensuring a complete an accurate count during the 2020 Census and a more balanced account of voters in all legislative districts in the state.”

The Democratic-sponsored legislation passed both houses of the Democratic-controlled New Jersey Legislature along largely partisan lines — 24-10 in the state Senate and 54-22 in the state Assembly. Many Republicans opposed the bill.

Experts say this law (S758) — which takes effect immediately — will not likely drastically change the next legislative map. That’s because there were fewer than 20,000 people imprisoned in New Jersey last year, according to the corrections department.

“Although the law may not have an immediate impact on any particular legislatives seats, over time it will restore political power to communities from which it had been artificially drained,” said Alexander Shalom, a lawyer for the state chapter of the American Civil Liberties Union.

John Farmer, a former state attorney general and director of the Eagleton Institute of Politics at Rutgers University said it “might have an effect at the margins of some districts.”

Blake Nelson can be reached at bnelson@njadvancemedia.com. Follow him on Twitter at @BCunninghamN.

Brent Johnson may be reached at bjohnson@njadvancemedia.com. Follow him on Twitter @johnsb01.

Have a tip? Tell us. nj.com/tips.

Get the latest updates right in your inbox. Subscribe to NJ.com’s newsletters.