A devout Christian couple who were fined $13,000 for refusing to host a lesbian wedding at the farm where they live and work did indeed break the law, a New York court ruled on Thursday.

Cynthia and Robert Gifford have been battling Melisa and Jennifer McCarthy ever since the women contacted them in 2012 asking to get married at Liberty Ridge Farm in Schaghticoke, New York.

In August, an administrative-law judge ruled that the Giffords had violated state law by discriminating against the couple and ordered them to pay the fines, but the Giffords appealed.

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

Scroll down for video

Fined: Cynthia and Robert Gifford, pictured, have been fined $13,000 for refusing to hold a gay wedding at their upstate New York farm, even though religious institutions in the state can legally refuse to hold them

Hurt: Jennie and Melissa McCarthy recorded the conversation in which the Giffords turned down their wedding party and filed a formal complaint with the state. Earlier this summer, they received compensation but the Giffords appealed

The Giffords had been hosting weddings at their upstate New York farm (above) for 15 years but since the lawsuit have decided not to hold them

New York law exempts some religious-oriented institutions from having to accommodate same-sex weddings, but a business that serves the public is in violation of the state's human rights law if it discriminates on the basis of sexual orientation.

'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' wrote in her decision.

The New York Civil Liberties Union represented the McCarthys, who found a different venue for their ceremony after several months.

Rather than comply with state law, the Giffords have chosen not to host wedding ceremonies on their farm, according to the farm's website. They do still host receptions. It is unclear if they would host a reception for a same sex couple.

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.

'New York chose to guarantee a society where lunch counters would serve black and white customers and businesses would not discriminate on the basis of sexual orientation, and all of us benefit from these protections,' said Mariko Hirose, senior staff attorney at the New York Civil Liberties Union and lead counsel on the case representing the McCarthys, according toThe Advocate.

'We’re glad the court upheld longstanding laws against discrimination, and we’re proud of the McCarthys for standing up for equal treatment of all New Yorkers.'

Back in 2014, when the case first broke, the farm-owning couple denied they were discriminatory.

Video courtesy Minnesota Family Council

Speaking out: The couple, who married at a different venue in 2013, were devastated, their lawyer said

'We respect and care for everyone!' Cynthia Gifford, 54, told the New York Post. 'We had an openly gay man working for us this past season. We've had a woman who's transitioning to be a man. We don't discriminate against anyone.'

Still, when Melisa McCarthy - then Melisa Erwin - contacted Mrs Gifford in 2012 and asked to have their summer 2013 wedding at the farm, she said no.

'When we asked why it was just, "That's what my husband and I decided. We've been married a long time and it's great you're getting married and all, but you can't do it here",' McCarthy told WNYT at the time.

The Giffords say their religious beliefs means they shouldn't have to hold same sex weddings at Liberty Ridge (pictured) but an appellate court disagreed

Gifford was unaware that Jennifer McCarthy had recorded the conversation and the same-sex couple filed a formal complaint with the state Division of Human Rights.

After the case became public, the farm suffered a backlash and they have been forced to lose some employees due to financial hardship, the Post reported.

Angry messages posted on the venue's Facebook page at the time suggested the McCarthys were not the only gay couple to have been denied access.

'Apparently if you are a same sex couple, you are not welcome as this place discriminates,' wrote one user, Denine Dorniak. 'Gay dollars are just as green as straight dollars.'

The Giffords were eventually ordered to pay $10,000 to the state and $1,500 to each of the brides for their mental anguish.

'They were devastated when they heard that Liberty Ridge Farm would not take their business because of who they are,' said their lawyer, Mariko Hirose, of the New York Civil Liberties Union.

The Giffords live at the farm with their 18-year-old daughter and 22-year-old son and have hosted an annual fall event there - including a maize maze and pumpkin patches - for 16 years.

'We've gone from tolerance to compulsion,' the Giffords' lawyer, James Trainor, told the Post.