Updated

The owners of an upstate New York wedding venue broke the law after refusing to host a lesbian wedding, a court decided Thursday.

Robert and Cynthia Gifford cited their conservative Christian beliefs in refusing to hose the 2013 wedding of Melisa and Jennie McCarthy at Liberty Ridge Farm, north of Albany. They appealed a ruling from the state’s Division of Human Rights, asserting their rights to free speech and religious exerices, but the appealed failed and they were fined $13,000.

The Appellate Division of state Supreme Court said the Giffords are free to express their religious beliefs but rejected their rights were being violated. The court ruled against the business owners 5-0.

"The Giffords are free to adhere to and profess their religious beliefs that same-sex couples should not marry, but they must permit same-sex couples to marry on the premises if they choose to allow opposite-sex couples to do so," Judge Karen Peters' decision said.

The Giffords were represented by an attorney for the Alliance Defending Freedom, a conservative Christian organization that says "a thriving culture upholds the value of life, marriage, and religious freedom."

The attorney, Caleb Dalton, said on the organization's website that the court "should have rejected this unwarranted and unconstitutional government intrusion." He said an appeal would be considered.

The New York Civil Liberties Union, which represented the McCarthys, said the ruling affirms that all state residents deserve to be treated with dignity and respect. The McCarthys married at another upstate farm.

Gay marriage became legal in New York on July 24, 2011. It became legal nationwide on June 26, 2015, following a U.S. Supreme Court ruling.

The farm announced in August 2014 it stopped hosting wedding ceremonies altogether, stemming from the lawsuit. The McCarthys approached the owners in 2012 about holding their nuptials at the farm, but were told they could only hold the reception there.

The Giffords, who testified in 2013 they were each raised as Christians, one Baptist and one Catholic, acknowledged similar religious beliefs about marriage. "It's one man and one woman as in the Bible," Robert Gifford said.

Cynthia Gifford said they welcome everyone and have had employees who are gay, but she acknowledged telling Melisa McCarthy in a phone call that there was "a little bit of a problem" with her inquiry about getting married there.

"We don't hold same-sex marriages here at the farm," Gifford said in a recording of the phone call, recorded by Jennie McCarthy and played at the hearing.

The couple, who now live in New Jersey, both testified that they had their hearts set on the farm wedding, that getting rejected by a business because of who they are was hurtful and it took them several months to find another rustic venue.

"Our goal in this was to ensure this doesn't happen to somebody else," Jennie McCarthy said in 2013.

The Associated Press contributed to this report.