(CNN) -- For the first time since the war on drugs became a national law enforcement obsession in the mid-1980s, the number of African-Americans in state prisons for drug offenses has declined, a criminal justice reform organization said.

The number of whites in state prison for drugs rose 42.6 percent since 1999, while blacks dropped 21.6 percent.

A study released Tuesday by the Sentencing Project found a 21.6 percent drop in the number of blacks incarcerated for drug offenses, a decline of 31,000 people, from 1999 to 2005.

The corresponding number of whites in state prisons for drug offenses rose 42.6 percent, or by more than 21,000 people, while the number of Hispanics was virtually unchanged, according to "The Changing Racial Dynamics of the War on Drugs."

The study, authored by Executive Director Marc Mauer, found that the differences between black and white imprisonments for drug crimes are partly because of how police target suspects and court sentencing guidelines, which vary by state.

Also, there has been a decrease in the use of crack cocaine in predominantly minority urban neighborhoods and an increase in methamphetamine abuse in many primarily white rural areas, Mauer said Wednesday.

The Sentencing Project, based in Washington, said it seeks to overhaul unfair, ineffective criminal justice policies and promote alternatives to incarceration. The group opposes stiff penalties for nonviolent drug crimes.

Mauer said that 2005 offers the most recent breakdown of racial data but there was no analysis by drug type. Nevertheless, "we know in broad terms" that crack and powder cocaine and methamphetamine have been key targets of law enforcement, he said. Crack use also is declining, he said.

Don't Miss

"We know that blacks have been disproportionately targeted for crack offenses ... conversely for whites," Mauer said Wednesday. A growing proportion of people have been imprisoned for abusing methamphetamine, he said, most of whom are white.

In addition, the study suggests that much of the difference between blacks and whites has been because of "police targeting of open-air drug markets" or street corners.

"It's conceivable that police are shifting their focus. There has been criticism of police for over policing black communities, especially when it comes to drug offenses," Mauer said.

He said 80 percent of crack offenders are black, while the rest are white or Hispanic.

"As crack use and sales have declined, or moved indoors in some cases, law enforcement activity may have been reduced correspondingly," the findings show.

"We don't know the exact extent of drug selling, what the levels are," but there is evidence they may be doing more indoors now, using cell phones more to make drug transactions so less obvious to police," Mauer said. He said police have reported this trend.

In addition, judges mete out harsher sentences for crack cocaine, most often used by minorities, and powder cocaine, usually favored by whites, although the chemical makeup of the two is the same, Mauer said.

According to the study, "the white increase may be related in part to more aggressive enforcement of methamphetamine laws. While methamphetamine is only used at significant levels in a relative handful of states, data from states such as Iowa and Minnesota show a substantial influx of these cases during this time period."

While the number of people in state prisons for drug offenses rose by less than 1 percent overall during the study period, the increase in federal prisons was more than 32 percent.

"The federal system has rigid, mandatory sentencing polices, especially for crack cocaine," Mauer said. "Also in the federal system, money is not an object there."

The mandatory federal sentence for selling about 500 grams or one pound of powered cocaine is five years, Mauer said. Someone convicted of selling about five grams of crack, or about two sugar packets, gets the same five-year term, he said.

Some in Congress are seeking to equalize penalties for crack and powder cocaine, he added.

The study was based on U.S. data from the Bureau of Justice Statistics, the FBI and the Department of Health and Human Services.