BISMARCK, North Dakota — North Dakota’s Republican-led House overwhelmingly endorsed legislation Tuesday that’s aimed at shielding schools and teachers from lawsuits arising from posting the Ten Commandments in classrooms.

The 76-16 vote came despite warnings from attorneys and school officials that the legislation would result in costly and unwinnable legal fights.

The GOP-controlled Senate approved the measure 34-13 last month. Hoping to fend off legal challenges, the House amended the bill with a requirement that the Ten Commandments be included in a display with other historical documents.

The bill now goes back to the Senate for concurrence. GOP Gov. Doug Burgum has not signaled whether he would sign the legislation.

Proponents of the legislation say it is intended to promote moral behavior in schools, and that that the United States was founded on Ten Commandments’ principals.

“We need to get back to what we were founded on,” said GOP Rep. Terry Jones, who leads a church congregation in New Town and carried the bill on the House floor. “If we will go back to that foundation, there will be a lot more happiness and civility in our nation.”

Attorneys and education officials told a House committee last week the bill likely violates the clause in the First Amendment of the U.S. Constitution that prohibits the establishment of religion by the government.

The American Civil Liberties Union, which has been tracking the North Dakota legislation, said in a statement Tuesday that passage of the legislation would invite litigation. The organization noted that not a single court has upheld the posting of the Ten Commandments in public schools, even if they are displayed with other material.

“As soon as the Ten Commandments goes up, students’ rights will have been violated and they will have a cause of action against the school district,” the ACLU said. “All students, regardless of their faith, should feel safe and welcome in our public schools. Displaying the Ten Commandments in classrooms and other school spaces would convey the opposite message.”

Fargo Democratic Rep. Karla Rose Hanson warned the Legislature would be “wasting taxpayer dollars” by passing the measure.

Simply posting the Ten Commandments along with other historical documents isn’t enough to make it pass muster with the courts, she said. The bill was inspired out of “religious intent, not historical intent.”

GOP Rep. Larry Klemin, a Bismarck attorney who headed the House committee that amended the bill, said if the legislation would ever reach the U.S. Supreme Court, it could be looked more favorably by the court because of its shift to the right following the appointment of three conservative justices by President Donald Trump.

“We do have a new Supreme Court and I think they may look more kindly on this than some of those have in the past,” he said.

“Thou shall not kill this bill,” Klemin said, while urging his fellow lawmakers to approve the measure.