BOSTON — The maker of Sam Adams beer announced Friday that it is withdrawing its sponsorship of Boston's St. Patrick's Day parade because organizers exclude gay groups.

Boston Beer Co.'s decision came a day after a bar in Boston's South End said it would no longer serve Sam Adams beer because of the brewer's affiliation with the parade, which is scheduled for Sunday.

Mayor Martin Walsh and U.S. Rep. Stephen Lynch have been trying to broker a deal that would have allowed a gay group to march, but those negotiations broke down.

"We were hopeful that both sides of this issue would be able to come to an agreement that would allow everyone, regardless of orientation, to participate in the parade. But given the current status of the negotiations, we realize this may not be possible," Boston Beer Co. said in its statement. "We share these sentiments with Mayor Walsh, Congressman Lynch and others and therefore we will not participate in this year's parade."

The brewer said it would continue to sponsor the annual St. Patrick's Day Breakfast, which is regularly attended by most of the state's major politicians. That is also on Sunday.

A Boston Beer Co. spokeswoman did not immediately return a call.

The parade organizers' phone went unanswered Friday.

The Irish-American mayor said he would not march in the parade unless gay groups were allowed to march.

He tried to broker a deal between the gay rights advocacy group MassEquality and the organizers, the South Boston Allied War Veterans Council. A 1995 U.S. Supreme Court decision ruled that the council could include or exclude whichever groups it wanted.

A sticking point was MassEquality's request that its members be allowed to carry banners or signs identifying themselves as gay, which organizers did not want.

Organizers said they had been "misled," because LGBT Veterans for Equality, an affiliate of MassEquality, was not a recognized veterans' organization.

The parade, one of the largest St. Patrick's Day parades in the nation, draws as many as 1 million spectators to South Boston.