Boston's St. Patrick's Day parade made history Sunday as two gay and lesbian groups marched after decades of opposition and a case that went all the way to the U.S. Supreme Court.

The gay military veterans service group OutVets and gay rights group Boston Pride joined the annual celebration of military veterans and Irish heritage at the invitation of the sponsoring South Boston Allied War Veterans Council.

"We march today for the memories of those thousands and thousands of people who went before us, some who went to their graves in the closet," OutVets founder and leader and Air Force veteran Bryan Bishop told his group before the parade. He called it "the beginning of the mission of this organization to honor the service and sacrifice of every single LGBT veteran, their family, their allies and every veteran in this country who fought so selflessly to defend the rights that we hold dear."

Sarah Jo Gomez-Lorraine, a Navy officer and OutVets member taking part in the march, said it's an honor to represent gay veterans who never got the opportunity to come out.

"I feel today that I stand on the shoulders of giants who've gone before me and never got to see this in their lives," she said. "It's very humbling to be able to stand in places that others never got to."

Boston Pride member Freddy Murphy said the open inclusion of gay groups was a long time coming.

"I just remember watching the parade and kind of thinking it was hopeless, that my entire world was against me," said Murphy, a Dorchester neighborhood native whose father was a Boston firefighter. "This is why I'm matching today."

The Allied War Council's current leaders voted 5-4 in December to welcome OutVets as one of about 100 groups in this year's parade. Boston Pride said it also received an acceptance letter this week.

"We honor immigrants and veterans, and they served," council leader Brian Mahoney said this week.

Boston's mayors had boycotted the event since 1995, when the council took its fight to exclude gay groups to the U.S. Supreme Court and won on constitutional grounds.

This year Mayor Marty Walsh, Gov. Charlie Baker and other Massachusetts political leaders took part.

First-term U.S. Rep. Seth Moulton, who served four tours in Iraq as a Marine, marched with OutVets. "I believe gay rights is the civil rights fight of our generation and this is a small, but important, step in the steady march toward freedom and justice," he said.

Some Roman Catholic groups declined to march, including the state Knights of Columbus, saying they felt this year's parade had been politicized. (***)