Karoly Barta, 46, the director of a Northwest Washington dance studio who pleaded guilty to taking indecent liberties with five preteen ballet pupils, was sentenced yesterday to a minimum three years in prison and forbidden to teach dance for at least four years after his release.

"You have forfeited your right to teach young children in such a delicate relationship as ballet," D.C. Superior Court Judge Fred B. Ugast said in issuing the sentence, which he called "one of the most difficult decisions I have made in 10 years on the bench."

"We don't know what future problems these young girls may have. . . . ," Ugast said. "Teachers have special responsibilities."

Several parents of former students at Dance for Washington Inc. were in court yesterday, where Barta burst into tears as he told Ugast, "I have done a terrible thing to the community, to those children.

"I regret the commotion I caused," Barta said. "I'm terribly sorry for the way I failed."

Barta, who for the last four years produced Christmas performances of "The Nutcracker" at Constitution Hall, pleaded guilty Dec. 28 to five counts of taking indecent liberties with pupils, the youngest of whom was 5.

Under his plea agreement with federal prosecutors Barta did not acknowledge his guilt. Yesterday, however, he said that he had "come to the realization of hard truths and learned to look at myself in the mirror."

Barta's attorney, W. Gary Kohlman, called his client "a very sick man" and asked that Barta be released on probation, saying that "his life has already been shattered."

Assistant U.S. Attorney Harold L. Cushenberry called the defendant "manipulative," and said Barta "didn't want to admit his responsibility."

Ugast sentenced Barta to serve three to 10 years on one count and gave suspended sentences of three to 10 years on four other counts. He ordered Barta placed on four years' probation after release from prison, with one condition being that he not teach dance.