Lawmakers in two states are working to pass bills that push back against the Supreme Court ruling on gay marriage.

In Texas, lawmakers are weighing a bill that would allow county judges to recuse themselves from issuing same-sex marriage licenses if they have personal religious objections.

The bill is expected to head soon to the Texas House after winning preliminary approval in the Senate 21-10.

"If we don't do this, we are discriminating against people of faith," said Republican state Sen. Brian Birdwell who sponsored the bill.

The move comes nearly two years after the U.S. Supreme Court's June 2015 decision legalizing gay marriage, but that's because the Texas Legislature only meets every two years.

State Sen. Sylvia Garcia, a Houston Democrat and former judge, says the law is unnecessary since Texas officials have been issuing marriage licenses for nearly two years without objection.

However, supporters of the bill say it's needed to protect the religious freedoms for people of faith.

Another state pushing back against the legalization of gay marriage is North Carolina. Legislators there are working to pass a bill that would make gay marriage illegal again.

House Bill 780 is titled "Uphold Historical Marriage Act," and it declares the Supreme Court's gay marriage ruling "null and void in the State of North Carolina."

The News & Observer reports the sponsors are contending that marriage is a states-rights issue.

Their plan would order state government to return to the constitutional amendment known as Amendment One, which was approved in a 2012 voter referendum. It also says that same-sex marriages performed in other states wouldn't be recognized in North Carolina.

The bill says the high court overstepped its authority, and the authority of Almighty God.

Here's what it states:

"The ruling of the United States Supreme Court not only exceeds the authority of the Court relative to the State of North Carolina and a vote of the People of the State on an issue pertaining solely to the State of North Carolina and the People of North Carolina but also exceeds the authority of the Court relative to the decree of Almighty God that "a man shall leave his father and his mother and hold fast to his wife, and they shall become one flesh" (Genesis 2:24, ESV) and abrogates the clear meaning and understanding of marriage in all societies throughout prior history."