CASTROVILLE — After a contentious week that involved two conflicting federal court rulings and heated rhetoric from Texas' governor and attorney general, Medina Valley High School's seniors graduated Saturday. And did so with plenty of prayer.

Despite a disclaimer at the beginning of the ceremony by the school district's superintendent that the students' and speakers' views were their own, the gathering at times resembled a revival as much as a small town graduation.

“The judge of all judges commands us to pray,” state Rep. John V. Garza, R-San Antonio, said during his remarks to the crowd, adding that his own daughter invoked God while graduating last year. “I still cringe thinking some left group would complain or file a lawsuit ... I thank God that all is well this evening and none of us will be thrown in jail.”

Applause erupted from the school's packed football stadium with each “amen” — more so than during speakers' frequent references to school spirit and claims of Medina Valley's superiority over other schools.

The political firestorm surrounding the school started late last month when the parents of an agnostic senior filed a lawsuit with the help of Washington, D.C.-based Americans United for Separation of Church and State.

The suit argued that in past years, the school violated a 1992 Supreme Court ruling barring school-sponsored prayer by including a student-led invocation and benediction at graduation ceremonies.

The battle heated up Tuesday, when Chief U.S. District Judge Fred Biery of San Antonio largely seemed to agree with the plaintiffs, granting an emergency court order that banned public prayer at Saturday's ceremony.

Under Biery's ruling, student speakers were allowed to refer to individual beliefs but the district was to instruct them not to ask for a group prayer, or ask for audience members to bow their heads, or use terms such as “amen.”

Few defenders of that ruling could be found Saturday as families filed into the stadium.

“We're for prayer and so is the entire student body,” said Hilda Longoria, whose son was graduating. “They're all sticking together.”

Representatives of the Medina Valley Independent School District have maintained they weren't violating the Constitution. The district did, however, remove the words “invocation” and “benediction” from the commencement program.

Instead, a student gave what were labeled opening remarks that began, “Those who wish, would you please pray with me?”

Soon after the initial ruling, both the school valedictorian, Angela Hildenbrand, and Attorney General Greg Abbott held news conferences decrying it as an unconstitutional ban on free speech and religion.

Both filed briefs with the 5th U.S. Circuit Court of Appeals in New Orleans supporting the district's emergency appeal.

Gov. Rick Perry and U.S. Sen. John Cornyn also joined the criticism, along with conservative groups such as the Liberty Institute and AGAPE Movement, which announced plans to hold a “One Nation Under God” rally outside the stadium. No one showed.

By Friday afternoon, a three-judge panel of the 5th Circuit Court of Appeals overturned Biery's decision, ruling it's not substantially likely the plaintiffs will be able to prove individual student prayers equate to school-sponsored prayer. The suit will remain pending in federal court.

Hildenbrand also led the audience in prayer, thanking God “for the freedom to be here today.”

Parent Michael Ethridge, watching his daughter cross the stage, said he believes whole-heartedly in the separation of church and state. But he also supports the valedictorian.

“You don't trample on First Amendment rights to appease the separation of state and church,” he said. “These were her words. If the boy didn't want to hear it, don't listen or don't come. But he didn't become valedictorian.”

Corwyn Schultz, the student whose parents filed the suit, apparently had similar thoughts. He was not among the seniors crossing the stage. The Schultz family has declined to comment on the rulings.