Los Angeles (AFP) - A California court said Friday that yoga classes taught at an elementary school do not violate students' right to religious freedom, after parents complained Hindu and Buddhist doctrines were being promoted.

The parents of two students at an Encinitas district school near San Diego said the yoga classes, which were taught as part of the school's physical education curriculum, infringed on their children's constitutional rights.

The First Amendment bans school-sponsored religious promotion and prayer.

But after a years-long court battle, the Fourth District Court of Appeal in San Diego ruled the courses are not faith-based.

"We conclude that the program is secular in purpose, does not have the primary effect of advancing or inhibiting religion and does not excessively entangle the school district in religion," Justice Cynthia Aaron wrote.

"The district's yoga program does not violate our state constitution," the Justice wrote.

The decision upholds an earlier ruling of a lower court, which the parents had sought to appeal.

Yoga, an exercise that promotes stretching and breathing, often incorporates spiritual elements from eastern faiths.

It has become popular in the West, and many practices in North America do not incorporate the religious aspects of the practice.