BOSTON _ They had been shot, beaten and jailed trying to register black folks to vote, and 40 years ago, a brave band called the Mississippi Freedom Democrats traveled by bus to the Democratic National Convention in Atlantic City, determined to replace the all-white delegation chosen amid a continuing reign of terror in the South.

It was not to be. Lyndon Johnson, who had just recently signed the Civil Rights Act of 1964 with the rueful prediction that his party would lose the South for a generation, feared that the sight of that mostly black delegation taking the seats of the white regulars might prompt a Southern backlash that would hand the presidency to Barry Goldwater.

The Freedom Democrats were offered but two at-large seats, and, adding insult to injury, were told who would fill them. They returned home feeling spurned and defeated.

But if they lost that battle, they won the war.

As a result of their challenge, the party agreed that no future convention would seat racially exclusive delegations and this week, about a dozen veterans of that Mississippi Freedom Democratic Party delegation, most still living in Mississippi, arrived at a Democratic Convention in Boston that has nearly as many black delegates from Mississippi and Alabama alone as the grand total of black delegates in Atlantic City.

In the last 40 years, African-Americans have become the bulwark of the Democratic Party in a transformed South. In becoming a truly integrated party, Democrats in the South have also become, in the simple arithmetic of winning, a less successful one, generally attracting only about a third of white voters in recent elections. Democratic presidential candidates rarely carry states of the Old Confederacy.

Emma Sanders, a Freedom Democratic delegate who in 1966 ran for Congress _ the first black on a Mississippi ballot since Reconstruction _ is one of 25 black delegates from Mississippi (out of 41). Her son Everett, who was the first black elected county prosecutor in Mississippi, is a Democratic national committeeman, and her grandson, Keelan, is the party’s acting executive director.

“I don’t think our efforts were entirely in vain,” she said. “There have been some remarkable changes in the last 40 years.”

“They gave birth to all of us,” said Larry Coleman, a black Mississippi delegate who as a 22-year-old government teacher in Greenwood, Miss., watched on television as Fannie Lou Hamer delivered her riveting testimony on behalf of the challenge before the credentials committee in Atlantic City.

“My heart was pounding,” said Coleman, “It was like an earthquake.’

But if history has judged the Freedom Democratic winners, Lyndon Johnson’s fears were not unfounded. The empowerment of blacks in the South was followed by the mass movement of whites into what had been a nearly non-existent Republican Party.

“You now have a solid Republican South because of the wholesale desertion of whites to the Republican Party,” said Coleman. White Democrats now often find themselves “embarrassed” among fellow whites, being told “You’re a white guy, you’re supposed to be a Republican.”

“The Democratic Party cannot succeed all black,” said Coleman, and its challenge is how to lure whites back without diminishing blacks’ hard-earned influence. So far, he said, “We haven’t come up with that strategy.”

However it has affected Democratic Party fortunes, the Freedom Democratic challenge was a signal moment in a struggle to undo a system in which a single white party had absolute dominion over the region of the country where most African-Americans live.

It is hard to overestimate how much things have changed since 1964.

It was a time, said Lawrence Guyot, who was the chairman of the Mississippi Freedom Democratic Party in 1964, when simply seeking to register to vote or help others could cost you your life. Guyot, who now lives in Washington, D.C., didn’t make it to Atlantic City. He was serving a 30-day sentence in a Hattiesburg jail, arrested when he asked why someone else had just been arrested.

Everett Sanders, a college student in 1964, was at home in Jackson when his mother was interviewed on national television from Atlantic City. He missed seeing her appearance, but within a few minutes the phone was ringing. “Somebody on the other end of the line said, `This is the Atlantic City funeral home. Where do you want Emma Sanders’ body delivered?”

Nonetheless, his mother came home, alive and undeterred. In 1966, she ran for Congress against the notorious segregationist John Bell Williams, who went on to become governor. She lost, but her run helped mobilize and identify black voters and paved the way for the subsequent election of the first blacks in Mississippi since Reconstruction. There are now more black elected officials in Mississippi than in any other state.

“Changes came faster than many of us would have thought possible in the 1960s,” said Ed King, a Methodist minister who was one of four whites in the MFDP delegation. “We did not have the confidence in the ’60s that by now African-Americans would be serving in Congress from every Southern state, except for Kentucky and Arkansas.”

In 1964, there were only 65 black delegates altogether on the floor of the convention _ less than 3 percent of the total. This year, according to the Joint Center for Political and Economic Studies in Washington, there are 871, one out of every five delegates.

And yet, there have been disappointments. With rare exceptions _ most especially former Gov. Douglas Wilder of Virginia _ blacks have had trouble getting elected to statewide office in the South, a source of deep frustration for the party’s dominant constituency.

“We’re going to make that day happen _ if not me, then someone,” said Cindy Ayers-Elliott, a delegate from Jackson who last year lost a bid for state treasurer. “You can’t win without us; you have to win with us,” said Ayers-Elliott, whose grandparents’ home was a “safe house” for civil rights workers in the 1960s.

The Democrats’ dilemma is compounded by another disappointment.

King said there was a deep faith in the movement that their struggle would ultimately liberate poor whites from the racism that kept them from voting their true interests in alliance with blacks.

“We thought it would open a door for whites to walk through,” said King. Instead, more whites walked out.

Still, most observers doubt that the South will ever be as completely Republican as it was once Democratic, and W. Martin Wiseman, the director of the John Stennis Institute of Government at Mississippi State University, said there are some encouraging signs for the Democrats.

From the completely integrated attendance at his local Democratic Party’s greens-and-beans dinner, to a heightened degree of cooperation between rural white Democrats and the Black Caucus in the Mississippi Legislature, Wiseman sees a party coming together.

“There is no longer even any concept of blacks or whites excluding each other; they both know they need each other,” said Wiseman, who says they have been helped mightily by the missteps of a new Republican governor, Haley Barbour, whose massive Medicaid cuts have provoked an angry reaction that crosses racial lines. “For those floundering trying to figure out what the reason was to be a Democrat, the governor has solved that problem,” said Wiseman.

For the modern Democratic Party, like their MFDP forebears, there is special solace in any signs of progress in Mississippi.

The civil rights movement focused on Mississippi because it was the worst of the worst. Crack the system there, the theory went, and the rest of the South would follow.

To Guyot, it will happen again. Forty years after Freedom Summer, at a time when he said most of America is less interested in racial justice, Mississippians, white and black, have been working together to call to account the perpetrators of racial crimes of the 1950 and 1960s.

On a bus ride to a ceremony honoring them, Guyot gestures toward his MFDP comrades, some of whom he hasn’t seen in more than 30 years. Here, among these few, are the name plaintiffs in three landmark Supreme Court cases that ended the poll tax, put teeth in the Voting Rights Act and redistricted Mississippi.

They changed America _ next to which, politics as usual is beanbag.

To Guyot the lesson of history, of the MFDP, is plain. It proved, he said,“the possibilty of ordinary people to do extraordinary things.”