The Montgomery County Board of Education voted early yesterday not to teach eighth graders about contraception, but to keep such instruction at the high school level.

Conservative and religious groups who termed the health unit "a vote for fornication," hailed the board's move as a victory for "traditional moral values."

The 5-to-2 vote came shortly after midnight after 2 1/2 hours of debate. The health unit, given this year as an experiment to eighth graders in three schools, was the focus of controversy second only to that which attended the board's school-closing decisions last fall.

William O'Reilly, director of the Maryland Federation of Catholic Laity, said that "it is extremely heartening that a majority on the board agrees with strong moral values . . . The best way to do to avoid unwanted pregnancies is to start with understanding the sacredness and sanctity of human life."

Mary Bowen, chairman of Citizens United for Responsible Education and one of the most vocal critics of the unit, said that she was "tremendously gratified. I feel the board made a very wise decision that will be beneficial in the long run . . . "

But Charles Short, executive secretary to the county's Commission on Children and Youth, said the commission strongly favored the entire six-week health education course for eighth graders.

Short said a study by the commission supported "clearly showed that there is a substantial amount of sexual activity among eighth and ninth graders . . . now many youngsters will not get contraception information early enough for it to make a difference."

Jim DeQuattro, whose daughter attends Highland Elementary, said, "All they have done is push the issue back out into the street," DeQuattro said. "It's definitely a step backward."

The vote was a victory for the board's conservative majority, which argued that pregnancy prevention was an inappropriate topic for eighth graders.

School board member Marian Greenblatt produced statistics from the county's Commission on Children and Youth that showed that only 4/100ths of one percent of Montgomery County children between 10 and 14 are sexually active and only 1/10th of one percent in the same age range had abortions between 1977 and 1980.

"Should this be the driving force to move this instruction from the 10th to the eighth grade?" Greenblatt asked. "The answer is no . . . "

Board member Carol Wallace said, "No unit on contraception should be taught at eighth grade. I can't accept it."

Only board members Blair Ewing and Elizabeth Spencer voted against keeping the contraception unit out of the eighth grade.

Since last February, 677 students have taken the two-day unit on contraception as part of a six-week pilot course at Redland Middle, Pyle Junior High and Westland Intermediate schools.The board also voted, 5 to 2, on a motion by member Joseph Barse, to eliminate from the curriculum a sex education film strip called "Teen-Age Pregnancy Prevention" that Barse said would only reinforce the idea that premarital sex is acceptable if one uses contraceptives.

The board also voted to require approval of sex education materials by six members of a citizen advisory panel instead of three, as is now the case.