Washington (CNN) -- President Obama signed a bill Tuesday reducing the disparity in penalties for the use of crack and powder cocaine, according to the White House.

The enactment of the law seals a hard-fought victory for civil rights activists who have argued for years that the differing punishments unfairly target African-Americans.

The Fair Sentencing Act repeals a five-year mandatory sentence for first time offenders, and for repeat offenders with less than 28 grams of crack cocaine. The old law set the mandatory sentence for conviction at five grams.

African-Americans have been far more likely than whites and Hispanics to be convicted for -- and receive the harsher penalties associated with -- possession of crack cocaine, according to government statistics. White and Hispanic defendants are more frequently charged with possession of powder cocaine.

The now-defunct measure had been in place for 25 years. The House passed the new law through a bipartisan voice vote last week, following approval by the Senate in March.

Support for reducing the disparity with powder cocaine offenders increased with reports beginning in 2002 by the U.S. Sentencing Commission calling for Congress to change the crack cocaine law. The commission is an independent agency in the judicial branch that develops national sentencing policy for the federal courts.

Rep. John Conyers, D-Michigan, recently contended that the new law will reduce sentencing disparity between crack and powder cocaine from 100-to-1 to 18-to-1. Conyers said crack mandatory sentences had pushed the number of drug offenders in federal prisons from fewer than 5,000 in 1980 to nearly 100,000 in 2009.

Obama and Attorney General Eric Holder had both publicly pressed for passage of the new statute.

"This day was long in coming," Holder said recently. The attorney general claimed the bill will "go a long way toward ensuring that our sentencing laws are tough, consistent, and fair."

Members of the Congressional Black Caucus had led the battle for passage for 10 years, but several key Republicans -- including Alabama Sen. Jeff Sessions and South Carolina Sen. Lindsey Graham -- also pushed for the change.

House Republicans Dan Lungren of California, James Sensenbrenner of Wisconsin, and Ron Paul of Texas also provided high-profile support.

Not all Republicans joined the majority, however.

The top Republican on the House Judiciary Committee Lamar Smith, R-Texas, argued vigorously shortly before passage that to reduce the crack cocaine penalties would be a serious mistake.

"Reducing the penalties for crack cocaine could expose our neighborhoods to the same violence and addiction that caused Congress to act in the first place," Smith said. "Crack cocaine is associated with a greater degree of violence than most other drugs. And more than any other drug, the majority of crack defendants have prior criminal convictions."



CNN's Terry Frieden and Alan Silverleib contributed to this report