For the first time in the 114-year history of Boston's St. Patrick's Day parade, gay rights activists marched openly under rainbow banners in the city's annual celebration of its Irish heritage, after organisers lifted a ban.

Two groups, Boston Pride and OutVets, were among dozens of contingents taking part in the parade through the centre of South Boston, an Irish-American bastion near downtown, bringing to end two decades of explicit exclusion.

Organisers had excluded gay groups, maintaining that homosexuality conflicted with Roman Catholic doctrine. But they came under intense pressure to change their position, which ran counter to the liberal attitudes that prevail in Massachusetts. The state was the first in the United States to legalise same-sex marriage in 2004.

The Allied War Veterans Council of South Boston, which organises the event, shortened the parade route by about half this year, after the city's near-record snowfall in recent weeks made it difficult to clear roads.

The lifting of the ban was not without controversy. The Massachusetts contingent of Knights of Columbus, a Catholic men's organisation, pulled out of the parade on Friday, calling the event "politicised and divisive."

The Knights had been criticised by the conservative Catholic Action League of Massachusetts, which accused them of "an unconscionable betrayal of Catholic moral principles" for plans to march. A private Catholic school in the Boston-area also said it would not send its marching band to the parade.

Mayor Martin Walsh, who last year skipped the parade because of its exclusion of gay groups, was marching on Sunday, becoming the first mayor to do so in 20 years.