Breanna Koski, left, and Joanna Duka of Brush & Nib Studio.

PHOENIX — The state’s high court has agreed to decide whether cities can force businesses to do work for customers’ whose views, practices or lifestyles conflict with the owners’ religious beliefs.

The move Tuesday by the Arizona Supreme Court most immediately affects the validity of a Phoenix ordinance prohibiting discrimination on the basis of sexual orientation. That law is being challenged by two women who do not want to prepare custom wedding invitations and other products for same-sex nuptials.

But whatever the justices rule will ultimately govern the extent that all communities, and the state itself, can force business people, who say they are open for business to all, to pick and choose their customers.

It will affect similar ordinances in Tucson, Tempe and Flagstaff.

The decision to hear the case is at least an interim victory for Joanna Duka and Breanna Koski, the owners of Brush & Nib Studio, who are seeking to void the Phoenix ordinance. Earlier this year, the state Court of Appeals rejected their claim that making it illegal for them to turn away business violates their constitutional rights.

No date has been set for the hearing.

The women say they have no problem selling pre-made products to same-sex couples.

Instead, the issue is what they call “customer-directed projects” where invitations and other items are prepared in consultation with the clients who want to direct their designs. Attorneys from the Alliance Defending Freedom, an organization of Christian lawyers, said that essentially forces them, unconstitutionally, to “speak in favor of same-sex marriages.”

That argument did not fly with the Court of Appeals.

“Simply stated, if appellants, as an economic entity, want to operate their for-profit business as a public accommodation, they cannot discriminate against potential patrons based on sexual orientation,” wrote Judge Lawrence Winthrop for the unanimous three-judge panel.

At this point, there is no clear federal precedent on the issue.

Earlier this year, the U.S. Supreme Court threw out a lower-court ruling that said a Colorado baker has no right to refuse to create a wedding cake for a gay couple.

That decision, however, was based on the justices saying the baker had not gotten a fair hearing before the Colorado Civil Rights Board.