Martha Coakley

In this Jan. 23, 2014 photo, Massachusetts Attorney General Martha Coakley speaks to two men after addressing a breakfast meeting of the Greater Boston Chamber of Commerce at a hotel in Boston. Coakley, a Democrat, is seeking the governor's office in the 2014 election. (AP Photo/Steven Senne)

A lawsuit that claims the Roman Catholic Diocese of Worcester refused to sell a Northbridge mansion to a gay couple who wanted to host weddings at the property has received the support of the Massachusetts Attorney General.

Martha Coakley's office said it filed a brief Thursday in Worcester District Court, arguing that anti-discrimination laws should apply to religious institutions.

“Our laws provide important protections for religious organizations and people of faith,” Coakley said in a statement. “These laws also strike a balance between religious freedoms and the rights of individuals to be free from discrimination. In this case, we believe that this family was unfairly discriminated against by the Diocese when it refused to sell them property based on their sexual orientation.”

The case was filed in 2012 by James Fairbanks and Alain Beret, a married couple from Sutton. The pair were looking for a venue in which to run an inn and host weddings, and wanted to buy the historic Oakhurst mansion in Northbridge, according to a Boston Globe story on the lawsuit.

The property was owned by House of Affirmation, Inc., an affiliate of the Worcester Diocese. After the diocese accepted an initial offer for the 26 acre property, the deal fell apart during negotiations, according to the lawsuit.

Then, a representative for the church inadvertently forwarded an email from the diocese, intended for its realtor. “Because of the potentiality of gay marriages there we are not interested in going forward with these buyers,” the email said.

The email instructed the realtor only to tell Fairbanks and Beret “the Diocese is making new plans for the property. You find the language.”

In court filings, the diocese argues that it is not bound by Massachusetts' anti-discrimination laws, "based on certain legal exemptions and constitutional protections."

The extent to which religious institutions are protected from discrimination laws has been the subject of debate in a number of high-profile instances recently.

In February, Arizona Gov. Jan Brewer vetoed a controversial bill that would have allowed businesses in that state to assert their religious beliefs to deny service to gay people.

And, in a case now before the Supreme Court, a group of Roman Catholic nuns are challenging a federal mandate that they pay for health insurance plans that provide birth control.

Oral arguments in the Northbridge case are scheduled for April 22 in Worcester District Court.

Martha Coakley brief in support of Northbridge gay discrimination lawsuit