Seventeen years after an all-white school board here sold one of the public schools for $1, a newly elected black majority on the board is trying to get it back from the segregated academy that has operated it since.

But restoring buildings to the public is not so easy. And in Shaw, which was the subject of a landmark civil rights decision in 1971 ordering the town government to provide equal services to blacks, the controversy has opened old wounds.

The fight in this rural, northwestern Mississippi town over the Bayou Academy is an opening shot in a battle under way throughout the South. In community after community, white officials during the 1960s transferred public property to private organizations as integration loomed.

Schools, swimming pools, athletic playing fields, even school books, were given to private owners. And now they are targets for blacks who want to reassert public ownership.

Aided by the 1965 Voting Rights Act, plus new job and educational opportunities, Shaw now has a black mayor and an all-black Board of Aldermen.

The five-man police force is all black. And, for the first time, this year blacks won a three-to-two majority on the regional school board.

Last month that school board voted 3 to 2, along racial lines, to order the all-white Bayou Academy to return the school building, and it gave them until April 23, this Saturday, to clear out.

The Bayou Academy has not responded formally, but word is out that the school's officials plan to put up vigorous resistance in court.

Gregory Flippins, former mayor of Shaw and the new black president of the school board, has charged that the school building was given to the Bayou Academy "in an underhanded way by elected officials. It was their way of establishing a segregated institution for white children--to keep white kids from going to school with black kids . . . . It was a direct attempt . . . to firmly continue segregation."

But Eugene Tarsi, a white school board member whose children attended Bayou and whose wife is a teacher there, said that the building was sold legally and that the board has no right to demand its return. Tarsi said that the building was sold in 1966 because it was dilapidated and too expensive to maintain.

As to Flippins' charges that the building was sold to maintain a segregated school system, Tarsi said, "Hogwash! . . . In 1966, there was freedom of choice. There was no segregation at that time. The colored were not going to the white schools , and the whites were not going to the colored schools . That was freedom of choice."

Meanwhile, as both sides dig in their heels for the fight, many here fear that the dispute could destroy the progress made in race relations since the mid-1960s.

That progress had not been rapid. More than a decade after the 1971 federal court decision, municipal services for blacks still are not equal.

In Shaw's main black residential section, separated from whites by two muddy streams known as Porter Bayou and Silver Bayou, many streets never have been paved. Others, paved after the court order, are cracked and pockmarked, with no curbs or sidewalks.

Shaw is just east of the Mississippi River about 120 miles south of Memphis. It has 2,448 residents, three-fifths of them black. While blacks have taken over most of the municipal jobs in Shaw, whites still own and control almost all the farm land, as well as the business and industry in the area. Blacks who depended on whites for jobs have tended to be reluctant to criticize white elected officials.

When the school board voted in 1966 to sell the school for $1 to the Skene Civic Improvement Society, it specified in the deed that it was to be used for the "cultural, civic, social, educational, moral, economic and industrial welfare" of the community. In deciding to give up the building, the board stipulated that no school would be operated "on or near" the site after that school year.

Joe Watford, spokesman for the Skene group, said, "Our comment has simply been that we're in compliance with the terms of our agreement, and we intend to keep title."

Flippins, 32, said he believes that the deed was violated when the building was leased to the Bayou Academy soon after its sale. For his pains, some whites regard him as a slick political opportunist.

Harold Tapley, a former World War II Navy combat pilot who now runs the Tapley Flying Service, accused Flippins of promoting "disunity among the races" for his political gain.

Tapley, former president of the school board, is one of the few whites in Shaw who sent his children to public schools rather than to Bayou Academy. "I thought white people should stay in the public school system," he said.

Tarsi said he believes that Bayou Academy holds the building legally and that it would be unfair now to return it to the public school system, which he said doesn't need another building.

"I'm not protecting the white," he said. "I'm protecting the law . . . . I'm interested in what's fair. They have not violated those provisions. . . . Anyway, the statute of limitation would protect it."

He said that since Bayou Academy took over the building, it has spent $100,000 to $140,000 for renovations and has purchased 17 acres of adjacent land for the school.

"It's a beautiful place now," he said. The alternative in 1966, he said, would have been to abandon the building and allow it to deteriorate.

Most of Shaw's white children attend Bayou Academy, Tarsi said, at an annual tuition of $1,200 to $1,400. The public school system now is more than 90 percent black.

But Tarsi said it is not a matter of racism.

"I'll be very frank with you," he said. "We're talking about quality education, preparedness for college.

The people sending their kids to that school are still paying taxes to the public schools. They're willing to sacrifice double to get a good education for their kids."

Tarsi said that a black student never has applied for admission, but he said he believes a black could be admitted to Bayou Academy "if he had the money for the tuition."

He and other whites complain that the school board, now dominated by Flippins, is focusing attention and money on the legal battle over the building at a time when it should be concentrating on academic issues.

"The school board shouldn't be trying to be detectives," Tarsi said. "We should be tending to school business . . . . I'm concerned that the parents are enjoying this poetic justice, but you know who's hurt by it. The kids are hurt."