WASHINGTON — President Obama, expanding his push to curtail severe penalties in drug cases, on Thursday commuted the sentences of eight federal inmates who were convicted of crack cocaine offenses. Each inmate has been imprisoned for at least 15 years, and six were sentenced to life in prison.

It was the first time retroactive relief was provided to a group of inmates who would most likely have received significantly shorter terms if they had been sentenced under current drug laws, sentencing rules and charging policies. Most will be released in 120 days. The commutations opened a major new front in the administration’s efforts to curb soaring taxpayer spending on prisons and to help correct what it has portrayed as inequality in the justice system.

In a statement, Mr. Obama said that each of the eight men and women had been sentenced under what is now recognized as an “unfair system,” including a 100-to-1 sentencing disparity between crack and powder cocaine offenses that was significantly reduced by the Fair Sentencing Act of 2010.

“If they had been sentenced under the current law, many of them would have already served their time and paid their debt to society,” Mr. Obama said. “Instead, because of a disparity in the law that is now recognized as unjust, they remain in prison, separated from their families and their communities, at a cost of millions of taxpayer dollars each year.”