After five hours of debate and comments from three dozen members of the public, the Loudoun School Board unanimously approved a policy late Tuesday night that would ban obscenity in school plays and require that student theater take account of community sensibilities.

The full nine-member board, grappling with the most controversial issue of its term, largely approved a policy adopted by its legislative policy committee on May 25. But it went further, banning any production that advocates commission of an illegal act or violation of school rules or policies.

"We have a straightforward policy that people understand and that school principals and drama directors have to abide by," said board member J. Warren Guerin (Sterling).

"I don't know how anyone could argue with advocating illegal acts," said board Chairman John A. Andrews II (Potomac).

Andrews said his biggest concern was to not preclude the classics from being performed in Loudoun schools. Throughout the meeting he held up "South Pacific" as an example of a work that may contain provocative material yet still be acceptable. The popular musical includes cross-dressing and talk of premarital sex.

The vote brought to a close a tumultuous debate about free speech and morality that had put the School Board in the middle of a national conversation over homosexuality's place in society and schools.

The policy was spurred by a student-written play performed at Stone Bridge High School in February whose main character was homosexual. In the play, a football player was spurned by friends after admitting he had feelings for another male student. In one scene, two male characters approached one another as if to kiss just as the stage lights went dark.

After the show was performed, the board was bombarded with hundreds of e-mails. Some wanted the board to adopt a policy banning the discussion of homosexuality from school stages, while others looked for a broader policy targeting the issue of sexuality in general. Still others said they feared a policy would stifle student free speech and creativity.

Those divisions were echoed Tuesday night by the overflow crowd at the board's bimonthly meeting.

"I was very pleased with how it turned out," said Patricia Phillips of Sterling. Phillips said the policy addressed her main concern, which was for "the normalization of homosexuality to be prevented."

David Weintraub, president of Equality Loudoun, said the policy's language was still vague and open to interpretation.

Board member Priscilla B. Godfrey (Blue Ridge) voiced her belief during the debate that illegal acts such as gambling or domestic violence, as portrayed in "Guys and Dolls" and "Taming of the Shrew," should continue to be permitted under the new policy.

But Joseph M. Guzman (Sugarland Run) said he thought the policy could be even tougher. He said he wants to see only "G-rated plays" in the Loudoun County schools.

Amanda Ellis, a junior at Potomac Falls High School, where she will be president of the International Thespian Society next year, said she was speaking on behalf of many drama students in Loudoun who feel a drama policy is unnecessary.

"There is no need to shelter us from the concepts of homosexuality, premarital sex and religions other than our own, but there is a resounding need to bring these so-called controversial themes out into the open so that people will no longer have reason to be afraid of ideas different from their own," Ellis said.

Terri Glass, an Ashburn resident with four children under the age of 10, said she saw the play with her 10-year-old and didn't understand "all this hoopla."

Glass said she had talked about the issue with a number of her friends and neighbors, and they didn't see the need for a policy.

"I feel like I'm here for the silent majority," she told the board. "It just seemed like this has dragged on" and has been "blown way out of proportion," she added in an interview. "There's a sense of there being a very vocal minority attempting to press policy."

The board's legislative policy committee met twice with school system attorney E. William Chapman to hash out language before coming up with the policy, which does not mention sexuality outright.

A variety of groups had encouraged their members to attend the board meeting. A minister at Leesburg Church of Christ wrote the School Board, saying that the policy recommended by the committee showed "contempt for the will of God in our community" and that he would encourage church members to express their disappointment that it did not go further.

Chris Stevenson, who is on the steering committee of the Community Levee Association, said his group had e-mailed about 300 people urging them to attend the meeting and show, according to the e-mail, "that parents do want the public schools to continue to provide wholesome experiences for their youth."

Superintendent Edgar B. Hatrick III must now issue guidelines to principals about how best to implement the policy.