Joanna Duka and Breanna Koski, the owners of Brush & Nib Studio, were accused of violating a local anti-discrimination ordinance. Monday's 4-3 decision reversed a lower-court ruling that favored the city.
"An individual has autonomy over his or her speech and thus may not be forced to speak a message he or she does not wish to say," the court's majority decision read.
Duka, a calligrapher, and Koski, a painter, were threatened with six months jail time and $2,500 in fines for every day they were in violation of the ordinance. They are now celebrating their judicial victory as "a huge win for religious freedom and freedom of speech."
Duka and Koski told "Fox News @ Night" last year they "serve all people" and decided to challenge the law to defend "the right of artists to create freely."
“Joanna and Breanna work with all people; they just don’t promote all messages," Alliance Defending Freedom senior counsel Jonathan Scruggs, who argued on the pair's behalf, said in a statement. "They, like all creative professionals, should be free to create art consistent with their convictions without the threat of government punishment."
Writing for the majority, Justice Andrew Gould concluded that the city of Phoenix “cannot apply its Human Relations Ordinance” to force Brush & Nib to “create custom wedding invitations celebrating same-sex wedding ceremonies in violation of their sincerely held religious beliefs.”
"Duka and Koski's beliefs about same-sex marriage may seem old-fashioned, or even offensive to some," Gould wrote. "But the guarantees of free speech and freedom of religion are not only for those who are deemed sufficiently enlightened, advanced, or progressive. They are for everyone."
The dissenting opinion called the ruling "deeply troubling," adding the case did not concern the content of the studio's products but was about the identity of the customer.
Jenny Pizer, law and policy director of LGBTQ-rights group Lambda Lega, which filed an amicus brief supporting the city's position, criticized the ruling, which does not represent a blanket exemption from the ordinance.
"The court misguidedly has concluded that free speech protections allow businesses to express anti-gay religious views by denying particular custom-design services to customers because of who they are," Pizer said.
Mayor Kate Gallego, a Democrat, emphasized that the ordinance remains in effect.
"I want to be clear: The city of Phoenix does not and will not tolerate hate in any form," Gallego said. "That doesn't change with today's ruling, and we will not stop with our fight."
Last year, the U.S. Supreme Court sided in a narrow ruling with a Colorado baker who refused to make a same-sex wedding cake, finding the state's civil rights commission showed anti-religious bias when it ruled against the baker.
Lawyers for the city are examining potential grounds for an appeal.
The Associated Press contributed to this report.