WASHINGTON -- Addressing what Democrats and Republicans agreed was a quarter-century-old injustice in drug sentencing, Congress gave final approval Wednesday to a bill reducing the penalty for crack cocaine offenders.

The legislation, which was welcomed by the Obama administration, reduces the disparities between sentences for powdered cocaine and crack cocaine based on the heavier weight of crack, which often is sold in crystals. Crack cocaine is used disproportionately by blacks, leading to complaints of discrimination.

"By sending the bill to the president, the House has taken an important step toward more just sentencing policies while enhancing the ability of law enforcement officials to protect our communities from violent and dangerous drug traffickers," Attorney General Eric Holder said. The White House said President Barack Obama would sign the bill.

A law was passed in 1986 that had the effect of giving crack cocaine offenders the same jail sentence as someone who possessed 100 times the same amount of powder cocaine. The bill narrows that ratio to 18-1 and eradicates the mandatory five-year jail sentence for first-time offenders charged with possessing 5 grams of crack cocaine. Under the new bill, a person in possession of 28 grams of crack cocaine would trigger that five-year jail sentence, said Julie Stewart, president Families Against Mandatory Minimums.

The bill was sponsored in the Senate by Sen. Richard Durbin, D-Ill., who teamed up with Sen. Jeff Sessions, R.-Ala., to pass the legislation unanimously in the Senate in March. Republican Sens. Orrin Hatch of Utah and Lindsey Graham of South Carolina also were vocal supporters. That same bipartisan support was echoed in the House, with only Texas Rep. Lamar Smith voicing opposition Wednesday.