WASHINGTON — President Obama is commuting the prison terms of eight people convicted on federal crack cocaine charges, saying they were punished under laws that permitted unfair sentencing disparities.

"In several cases, the sentencing judges expressed frustration that the law at the time did not allow them to issue punishments that more appropriately fit the crime," Obama said in a statement.

One of those commuted -- Reynolds Allen WintersmithJr. -- is a cousin of Massachusetts Gov. Deval Patrick, a long-time political supporter of Obama.

Officials said there was no contact between the Patrick and Obama administrations on the Wintersmith case.

Jesse Mermell, a spokesperson for Patrick, said the governor "doesn't recall having met Mr. Wintersmith, and was not involved in any application for a commutation of his sentence. The governor only learned that Mr. Wintersmith's sentence had been commuted through today's media reports."

Patrick is nearly two decades older than Wintersmith.

In previous years, Obama has criticized past sentencing laws that treated offenses involving crack cocaine more harshly that those involving powder cocaine.

In 2010, the president signed a law that reduced those sentencing disparities; Thursday's commutations involved defendants sentenced prior to that law.

"This law began to right a decades-old injustice, but for thousands of inmates, it came too late," Obama said in a statement. "If they had been sentenced under the current law, many of them would have already served their time and paid their debt to society."

The eight people were sentenced to at least 15 years in prison, often under mandatory minimums that tied the hands of judges.

The president has also called for new legislation that would further reduce sentencing disparities.

During his presidency, Obama has commuted only one other prison sentence.

In addition to describing the disparities as unfair, Obama said the sentencing disparities also led to prison overcrowding.