Maryland has finished counting prison inmates to comply with a new state law that changes how they are counted for legislative redistricting purposes.

The results were certified Tuesday by state agencies.

Maryland became the first state in the nation last year to decide to count inmates as residents of where they last lived, instead of the areas where they're often imprisoned.

State legislative districts in Baltimore gained the most from the adjustment process. But state officials say the increases were modest compared to the overall population of the five districts. The districts are still well below the ideal district size of 122,813.

The biggest losses were in areas with large state correctional institutions in western Maryland and the Eastern Shore.