Newt Gingrich has warned of a judicial crisis if the Supreme Court upholds a federal court's ruling against California's gay marriage ban, Proposition 8.

The Ninth Circuit Court of Appeals on Tuesday upheld a lower court's decision that found the ban to be unconstitutional.

(Related: Court says gay marriage ban Prop 8 violates 14th Amendment.)

“With today's decision on marriage by the Ninth Circuit, and the likely appeal to the Supreme Court, more and more Americans are being exposed to the radical overreach of federal judges and their continued assault on the Judeo-Christian foundations of the United States,” Gingrich said in a statement released on his website.

“Federal judges are substituting their own political views for the constitutional right of the people to make judgments about the definition of marriage.”

Citing earlier slavery and abortion cases, Gingrich added: “Judicial solutions don't solve contentious social issues once and for all.”

“Should the Supreme Court fail to heed the disastrous lessons of its own history and attempt to impose its will on the marriage debate in this country by affirming today's Ninth Circuit decision, it will bear the burden of igniting a constitutional crisis of the first order.”

He added that it could take generations to recover from “a crisis of legitimacy for the federal judiciary.”

Other GOP presidential candidates have also spoken out against the ruling. Frontrunner Mitt Romney said the judges had incorrectly interpreted the Constitution. Rick Santorum said the ruling effectively called opponents of marriage quality “haters” and “bigots.”