The Arizona Court of Appeals on Thursday upheld a Phoenix ordinance that prohibits discrimination based on sexual orientation and gender identity.

Joanna Duka and Breanna Koski, owners of Brush & Nib Studio, which specializes in custom wedding invitations, filed a lawsuit against the city, claiming that Phoenix's ordinance conflicts with their religious beliefs and violates their freedoms of speech and religion.

In October, a trial judge ruled against their attempt to invalidate the city ordinance. The company appealed their case.

In upholding the lower court's decision, the appeals court cited a Supreme Court decision that sided with a Colorado baker who refused to create a wedding cake for a gay couple. In Masterpiece Cakeshop, the high court said that the Colorado Civil Rights Commission had shown hostility toward the baker's religious beliefs in ruling that he had violated the state's anti-discrimination laws when he refused to make the cake. Rather than striking down the law, the high court vacated the decision.

(Related: Supreme Court narrowly sides with baker who refused gay couple.)
The ruling also reaffirmed protections for gay men and lesbians.

“[A]llowing a vendor who provides goods and services for marriages and weddings to refuse similar services for gay persons would result in 'a community-wide stigma inconsistent with the history and dynamics of civil rights laws that ensure equal access to goods, services and public accommodations,'” the three-judge panel wrote.

The American Civil Liberties Union (ACLU) cheered the ruling.

“The Arizona court today rightly ruled that businesses open to the public must be open to all and cannot discriminate against potential customers based on who they are: in this case, members of the LGBT community," Joshua Block, an ACLU senior staff attorney, said in a statement.