The success of the campaign to reduce the District's out-of-wedlock births stems more from shifts in the city's population than from decisions by single women not to have babies, according to a study that questions whether a federal grant program aimed at changing behavior met its goal.

The grant program, sometimes called the "illegitimacy bonus," gives annual rewards for the biggest reductions in out-of-wedlock births, with the goal of encouraging states and the District to undertake innovative efforts at social change. The District's declining share of unwed births has won more money than any state -- more than $100 million -- since the bonus fund began five years ago. The city might win again in the next round of rewards, in September.

But the study, which used vital statistics and census data, concluded that the main reason birthrates for unwed mothers declined was the city's shrinking population of black women younger than 35, especially high school dropouts -- the group that studies have found is most likely to have babies out of wedlock. While births to black women have been declining, births to other racial and ethnic groups are rising.

That change is part of a broader reshaping of the city's demographics that is producing a smaller and better-educated black majority. Thousands of black city residents have left for the suburbs, and members of other racial and ethnic groups have moved in. At the same time, the city's black population has a higher share of college graduates and a lower share of high school dropouts than it used to.

"D.C. had a remarkable decline in non-marital births for which it was handsomely rewarded, and for that, D.C. residents can thank largely demographic changes," said City University of New York economist Sanders Korenman, the study's lead author. "There may have been some changes in behavior consistent with the intentions of the illegitimacy bonus, but that is a small part of the overall picture."

Vital statistics for the District illustrate a remarkable social change: In 1994, 6,746 babies were born to single mothers -- 69 percent of births to city residents. In 2002, that figure was down to 4,236 babies, or 57 percent of births to city residents.

City officials do not challenge the study's overall analysis but say it is incomplete because they know their programs have steered some young women away from unwed pregnancy. The bonus money has underwritten those efforts, they say, and they are concerned that it could be rolled back.

Some experts say the study offers a cautionary tale about government programs trying to influence social change. The bonus fund was part of a 1996 federal welfare reform bill that Congress, though stalled by partisan disagreements, is rewriting. The new bill is likely to replace the unwed births bonus program with new provisions to encourage states to promote marriage.

Roderick J. Harrison, a former Census Bureau official who heads the data bank project at the Joint Center for Political and Economic Studies, said the bonus study is a "beautiful piece of policy research" with a sharp point that illustrates the pitfalls of the present legislation or what might supplant it.

"It would take a fairly ingenious and complex set of indicators to tease out something that would actually be tracking marriage promotion," he said. "Our social behavior is much more complex than some of these simplistic ideological arguments."

The bonus fund, pushed by conservative lawmakers, set up an annual competition among states and the District to give a total of $100 million a year to those with the biggest declines in births to unwed mothers without a rise in abortion. Advocates hoped to cut government spending because unmarried mothers are more likely to be poor and seek public assistance.

Ron Haskins, a former Republican Senate staff member who helped draft the provision, said the study is "a little discouraging." Haskins, now at the Brookings Institution, said, "The bonus seemed right at the time, but if Korenman is correct -- and I have no basis to dispute his work -- some states are winning the bonus without doing much of anything to reduce non-marital births."

The Korenman study concluded that a small part of the District's reduction in unwed births was due to fewer women choosing to have babies out of wedlock -- mainly teenagers and women older than 35. But for those in their twenties and early thirties, who account for most babies, population change was the main reason that unwed births declined, the study said.

The study, first presented at the Population Association of America conference this year, is being published by the National Bureau of Economic Research. It also looked at the two other big bonus winners, Alabama and Michigan, and concluded that demographic change completely explained the decline in Alabama's unwed births, but not Michigan's.

Nationally, one in three babies is born to an unmarried mother, and the rising national rate leveled off in the mid-1990s. But births to unmarried teenagers are still dropping, nationally and in the District, a trend experts say is especially important because those babies are most at risk of poverty, behavior problems and other ills.

In the debate over why unwed birthrates are no longer rising, some experts credit massive campaigns to encourage unmarried women to practice contraception or abstinence. Others cite state and federal tightening of welfare eligibility rules in the 1990s.

D.C. officials say that their programs are successful and note that they have won four other federal awards for helping welfare recipients get jobs and keep them. The city has spent more than $17 million since 2000 on teenage pregnancy prevention, targeting students beginning in sixth grade and neighborhoods with high unwed birthrates.

City officials have not done a rigorous study of the impact of their efforts, but they cite two statistics: Teen births in the District have been cut in half in five years, and of more than 1,000 teenage mothers enrolled in the past seven years in a program to discourage them from having a second baby, only three have had additional children.

"To the extent that the programs are looked at as if they don't matter makes our job more difficult," said Kate Jesberg, the city's top welfare official in the Department of Human Services. "We accomplished something over the last five years that was absolutely outstanding."

Recently, the city began distributing a CD at Metro stations and other venues with rap lyrics urging "safe sex or no sex . . . use the latex." The District also has sponsored a program that gives students a hypothetical paycheck and then sends them to a "reality store" to check prices of day care, baby food, rent and other costs of parenthood. If pregnancy happens, D.C. social workers can offer an array of services from drug counseling to job training to encourage teenage mothers and fathers to focus on becoming self-sufficient.

"They've made a decision or allowed a decision to be made" to have a child, said senior social worker Henry Jones. "Now they have to be more conscientious to make good decisions for themselves and for the life they've created."