Supporters of gay marriage stand beneath a large rainbow flag which is placed in support of gay marriage in front of the U.S. Supreme Court in Washington, D.C., on April 28, 2015. (Photo by Astrid Riecken For The Washington Post)

Kansas Gov. Sam Brownback (R) on Tuesday issued an executive order asserting that clergy and religious organizations cannot be penalized by the state for refusing to recognize or provide services for a same-sex marriage.

The order comes nearly two weeks after the Supreme Court ruled that same-sex couples have a constitutional right to marry, paving the way for gay couples to marry across the country. It is the latest sign that the battle has shifted to the issue of religious liberties, and how much leeway people of faith have to opt out of providing services to or recognizing gay unions.

Gay rights groups immediately condemned the executive order. In a statement, Sarah Warbelow, legal director for the Human Rights Campaign, said the order both feeds false rumors that clergy will ultimately be forced to officiate same-sex marriages, and invites hospitals and other religiously affiliated organizations to refuse to recognize gay couples’ marriages.

“Having nothing to do with religious freedom and everything to do with enabling discrimination, this executive order is divisive, unnecessary, and sends the wrong message,” she said.

The Supreme Court ruled, 5 to 4, that same-sex marriage bans are unconstitutional. Here's what you need to know. (Gillian Brockell/The Washington Post)

In announcing the order, Brownback said the order was necessary to defend the rights of religious Kansans in the wake of the Supreme Court decision. “Today’s executive order protects Kansas clergy and religious organizations from being forced to participate in activities that violate their sincerely and deeply held beliefs,” he said in a statement.

The order bars the state from acting against any individual clergy or religious leader who declines to participate in a same-sex ceremony, or any religious group that declines to provide services for or recognize a same-sex marriage if it conflicts with their faith or moral conviction. An example of a prohibited action would be to revoke the tax-exempt status of a religious organization.