A judge ruled Monday that a public school district can teach yoga, siding with administrators who argued the practice is a secular way to promote strength, flexibility and balance and rejecting pleas of parents who said the classes are inherently religious and violate the constitutional principle of separating church and state.

Yoga is a religious practice, but not the way that it is taught by the Encinitas Union School District at its nine campuses, San Diego Superior Court Judge John S. Meyer said.

Meyer emphasized that the school district stripped classes of all cultural references, including the Sanskrit language. The lotus position was renamed the "crisscross applesauce" pose.

The judge said parents who objected relied on personal opinions, some culled from Internet searches.

"It's almost like a trial by Wikipedia, which isn't what this court does," said Meyer, who took nearly two hours to explain a decision that explored yoga's Indian roots and philosophy.

Dean Broyles, an attorney for Encinitas parents Stephen and Jennifer Sedlock, said he would likely appeal.

"It was the judge's job to call balls and strikes and determine the facts. I think he got some of the facts wrong," he said.

The district is believed to be the first in the country to have full-time yoga teachers at every one of its schools. The lessons are funded by a $533,720, three-year grant from the K.P. Jois Foundation, a nonprofit group based in Encinitas that promotes Asthanga yoga.

The twice-weekly, 30-minute classes are offered to the district's 5,600 students north of San Diego, in addition to regular physical education.

About 30 families have opted out of the classes, which were introduced in 2011 at one campus and later expanded to others, Superintendent Timothy Baird said. The superintendent hailed the ruling, calling yoga "21st century P.E." that yielded "amazing" health benefits.

The judge said the Jois Foundation's involvement was troubling but rejected parents' arguments that it amounted to a stealth attempt to guide students to Eastern religion. The foundation insists that the classes are not religious.

The lawsuit did not seek monetary damages but asked the court to intervene and suspend the program.

The plaintiffs relied heavily on testimony of Candy Gunther Brown, an Indiana University religious studies professor who found the district's program is pervasively religious, having its roots in Hindu, Buddhist, Taoist and metaphysical beliefs and practices.

Yoga is now taught at public schools from the rural mountains of West Virginia to the bustling streets of Brooklyn as a way to ease stress in today's pressure-packed world where even kindergartners say they feel tense about keeping up with their busy schedules. But most classes are part of an after-school program, or are offered only at a few schools or by some teachers in a district.